mirror of
https://github.com/discourse/discourse.git
synced 2025-06-15 20:45:24 +08:00
DEV: Use object spread instead of Object.assign (#30407)
This commit is contained in:
@ -14,10 +14,7 @@ export function deepMerge(...objects) {
|
||||
if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {
|
||||
target[key] = targetValue.concat(sourceValue);
|
||||
} else if (isObject(targetValue) && isObject(sourceValue)) {
|
||||
target[key] = deepMergeInner(
|
||||
Object.assign({}, targetValue),
|
||||
sourceValue
|
||||
);
|
||||
target[key] = deepMergeInner({ ...targetValue }, sourceValue);
|
||||
} else {
|
||||
target[key] = sourceValue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user