Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Suggested alternative for deprecated angular.merge doesn't behave exactly like the deprecated method. #16187

Closed
@absrd

Description

@absrd

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions