Skip to content

squares.set({}, "key[0][0]", "value") throws an error #3

@kuba-orlik

Description

@kuba-orlik

Here's the gist of it:

> squares.set({}, "key[0][0]", "value")
TypeError: acc.push is not a function
    at /home/kuba/projects/sealcode/sealious/www-server/node_modules/squares/index.js:60:11
    at Array.reduce (native)
    at Object.exports.set (/home/kuba/projects/sealcode/sealious/www-server/node_modules/squares/index.js:39:29)
    at repl:1:9
    at REPLServer.defaultEval (repl.js:262:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:431:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)

Which is weird, as it works perfectly fine for this case:

> squares.set({}, "key[a][a]", "value")
{ key: { a: { a: 'value' } } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions