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

fix: object merging #1058

Merged
merged 1 commit into from Sep 4, 2023
Merged

fix: object merging #1058

merged 1 commit into from Sep 4, 2023

Conversation

cossssmin
Copy link
Member

Switched to using a custom function based on lodash.mergeWith instead of lodash.merge, to avoid overwriting array values when merging objects (reference). Fixes #1057.

Given this:

merge(
  {foo: ["a", "b", "c"]},
  {foo: ["d"]}
)

Previously:

{
  foo: ["d", "b", "c"]
}

Now:

{
  foo: ["a", "b", "c", "d"]
}

use custom function based on lodash.mergeWith to avoid overwriting array values when merging
@cossssmin cossssmin merged commit 7713fad into master Sep 4, 2023
3 checks passed
@cossssmin cossssmin deleted the fix/object-merging branch September 4, 2023 10:53
cossssmin added a commit that referenced this pull request Dec 29, 2023
undo #1058 as it caused data duplication, explained in #1057
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Components folders config isn't additive contrary to what the docs say
1 participant