mirror of
https://github.com/iconify/iconify.git
synced 2025-01-06 23:23:58 +00:00
Ignore undefined when merging objects
This commit is contained in:
parent
a508b4c051
commit
8da393c816
@ -13,7 +13,10 @@ export function merge<T>(item1: T, item2?: T, item3?: T): T {
|
||||
const item = items[i];
|
||||
if (typeof item === 'object' && item) {
|
||||
for (const key in item) {
|
||||
result[key] = (item as MergeObject)[key];
|
||||
const value = (item as MergeObject)[key];
|
||||
if (value !== void 0) {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user