Skip to content

set() fails to set keys/value with certain inputs #1229

@chrishiestand

Description

@chrishiestand

Take for example:

var hash = {};
_Lo.set(hash, ['a','1string'], 'myvalue');

I expect this to yield: { "a" : { "1string" : "myvalue" } } but instead it yields: { "a" : [] }

I narrowed the issue down to isIndex() returning true when "1string" is the input. I am filing a pull request which contains failing tests but will pass when this problem is fixed. Apologies I do not know javascript's weird edge cases well enough to quickly fix the problem; I'm hoping that someone else sees a simple solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions