Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dset throws when encountering null in object #36

Open
bgoscinski opened this issue Apr 24, 2022 · 0 comments
Open

dset throws when encountering null in object #36

bgoscinski opened this issue Apr 24, 2022 · 0 comments

Comments

@bgoscinski
Copy link
Contributor

bgoscinski commented Apr 24, 2022

This test currently fails:

  objects(`should ${verb} null values`, () => {
    let { input } = prepare({ hello: null });

    dset(input, ['hello', 'a'], 123);

    assert.equal(input, {
      hello: { a: 123 },
    });
  });

with:

   FAIL  objects  "should overwrite null values"
    Cannot set properties of null (setting 'a')

lodash.set correctly overwrites null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant