Skip to content

immutable.set by index should generate undefined instead of empty #36

@syabro

Description

@syabro
const immutable = require('object-path-immutable')
const x = {}
console.log(immutable.set(x,'arr.5', 'hello'))

returns
{ arr: [ <5 empty items>, 'hello' ] }

Which leads to different bugs, for example x.arr.map will iterate only 'hello' element.

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