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 creates array instead of object for nested empty string property #35

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

Comments

@bgoscinski
Copy link
Contributor

This test currently fails:

	objects(`should ${verb} empty string property`, () => {
		let { input } = prepare({});

		dset(input, ["hello", ""], 123);

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

with

   FAIL  objects  "should merge empty string property"
    Expected values to be deeply equal:  (equal)

        ··{
        Actual:
        --··"hello":·[]
        Expected:
        ++··"hello":·{
        ++····"":·123
        ++··}
        ··}
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