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

an undefined value prevents merging (when merging 3+ objects) #460

Closed
RebeccaStevens opened this issue May 20, 2024 · 1 comment · Fixed by #462
Closed

an undefined value prevents merging (when merging 3+ objects) #460

RebeccaStevens opened this issue May 20, 2024 · 1 comment · Fixed by #462
Labels
Priority: High After critical issues are fixed, these should be dealt with before any further issues. Status: Released It's now live. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors.

Comments

@RebeccaStevens
Copy link
Owner

Bug Report

If one or more values are undefined, the mergeOthers route is taken.

Expected behavior

const x = { a: { b: 1 } };
const y = { a: undefined };
const z = { a: { c: 3 } };

const merged = deepmerge(x, y, z); // { a: { b: 1, c: 3 } }

Actual behavior

const x = { a: { b: 1 } };
const y = { a: undefined };
const z = { a: { c: 3 } };

const merged = deepmerge(x, y, z); // { a: z.a }
@RebeccaStevens RebeccaStevens added Priority: High After critical issues are fixed, these should be dealt with before any further issues. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors. labels May 20, 2024
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
RebeccaStevens added a commit that referenced this issue May 20, 2024
by default, undefined is now filtered out. fix #460
github-actions bot pushed a commit that referenced this issue May 20, 2024
# [7.0.0](v6.0.3...v7.0.0) (2024-05-20)

### Code Refactoring

* rename DeepMergeFunctionUtils to DeepMergeUtils ([e821255](e821255))
* rename DeepMergeMerge* to DeepMerge* ([fd4d2d4](fd4d2d4))

### Features

* allow filtering out values before merging them ([0784f63](0784f63)), closes [#460](#460)

### BREAKING CHANGES

* rename DeepMergeFunctionUtils to DeepMergeUtils
* rename DeepMergeMerge* to DeepMerge*
* allow filtering out values before merging them
Copy link

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the Status: Released It's now live. label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High After critical issues are fixed, these should be dealt with before any further issues. Status: Released It's now live. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant