Skip to content

merge and mergeWith treat properties inconsistently with top-level arguments #1394

@rwe

Description

@rwe

See comment here: #556 (comment)

merge(["1"], {a: 2}) gives a different result than merge({x: ["1"]}, {x: {a: 2}}).x, which is probably unexpected.

Note that the merging is consistent in the compat version.

The type checking performed on each property should possibly instead be done to at the top level of "source" and "target", in order to keep the recursive behavior consistent.

Metadata

Metadata

Assignees

Labels

help wantedGood for new contributorsp0: major bugbugs in major functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions