Suggested alternative for deprecated angular.merge doesn't behave exactly like the deprecated method. #16187
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (see above))
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 object Lodash.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.