Skip to content

FIx Reduction of empty array error #10

@rgertenbach

Description

@rgertenbach

mapkob.Row.prototype.sum generates

C:\Users\Robin\Desktop\mapkob.js:239
}, this).reduce(function(x, y) {
^

TypeError: Reduce of empty array with no initial value
at Array.reduce (native)
at mapkob.Row.sum (C:\Users\Robin\Desktop\mapkob.js:239:12)
at mapkob.Row.probabilities (C:\Users\Robin\Desktop\mapkob.js:251:18)
at mapkob.TransitionMatrix.generateChain (C:\Users\Robin\Desktop\mapkob.js:190:7)
at Object. (C:\Users\Robin\Desktop\mapkob.js:318:19)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
[Finished in 19.1s]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions