This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Suggested alternative for deprecated angular.merge doesn't behave exactly like the deprecated method. #16187
Closed
1 of 3 tasks
Milestone
Comments
Interesting, looks like it's idd not the same behavior, see: https://plnkr.co/edit/zVoIVIz52ZAUTUsN133T?p=preview I guess this should be changed: Line 426 in 464dde8
Not sure Note: even tho |
I don't think we need a function that is 100% compatible with |
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 14, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 14, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 14, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 16, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 16, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 16, 2019
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Jan 21, 2019
Narretz
added a commit
that referenced
this issue
Jan 21, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a ...
Current behavior:
It's more a misguided suggestion in documentation. It is with regards to deprecation of angular.merge and the suggested alternative, Lodash.merge. Lodash doesn't handle defined keys with undefined values, i.e. if I have an object
a = {b: 1}
and merge it with another objectLodash.merge(a, {b: undefined})
then the result is{b: 1}
, which would be{b: undefined}
in angular.merge.Expected / new behavior:
The alternative library should be as close to the deprecated method.
Minimal reproduction of the problem with instructions:
Look above.
AngularJS version: 1.x.y
Browser: all
Anything else:
Suggest another library, e.g: https://www.npmjs.com/package/deepmerge
I'm not associated with the above library other than I'm now using that instead of Lodash.
The text was updated successfully, but these errors were encountered: