Skip to content

Commit 98d3a63

Browse files
authored
fix: Duplicate values during deep assign of extra files (#7019)
Filters out duplicate assign's when cascading configs (files, extraFiles, etc.) by converting to Set first
1 parent 62cf003 commit 98d3a63

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/mean-cheetahs-look.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"builder-util": patch
3+
---
4+
5+
fix: Filter out duplicate values during deep assign of extra files by converting to Set first

packages/builder-util/src/deepAssign.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function assignKey(target: any, from: any, key: string) {
1818
if (prevValue == null || value == null || !isObject(prevValue) || !isObject(value)) {
1919
// Merge arrays.
2020
if (Array.isArray(prevValue) && Array.isArray(value)) {
21-
target[key] = prevValue.concat(value)
21+
target[key] = Array.from(new Set(prevValue.concat(value)))
2222
} else {
2323
target[key] = value
2424
}

0 commit comments

Comments
 (0)