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

deepAssign does not support updating arrays using objects with numeric keys #99

Open
4 tasks
justinbmeyer opened this issue Jan 20, 2018 · 0 comments
Open
4 tasks

Comments

@justinbmeyer
Copy link
Contributor

@RyanMilligan commented on Fri Jan 19 2018

How often can you reproduce it?

  • [ x ] Always
  • Sometimes
  • Rarely
  • Unable
  • I didn’t try

Description: deepAssign() does not support updating specific items in arrays by passing objects with an index of, for example, 1. Instead, it ignores the keys in the source object and updates the first N items in the array.

  1. JSBin: https://jsbin.com/suyowov/edit?js,console,output
  2. Open the console and run the script
  3. The third object output should show that "second" has changed to 2, but instead the 1 from the previous output has changed to 2

Actual results: Only the first item in the array can be edited in this way

Environment:

Software Version
can-define version 1.5.4
Browser Chrome Update 63
Operating system Windows 10 # #

@RyanMilligan commented on Fri Jan 19 2018

A proposed solution can be found here but I logged it here at the request of @phillipskevin.

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

No branches or pull requests

1 participant