mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
Refactor dex.loadData w/ spread syntax (#10639)
Results in fewer object shapes
This commit is contained in:
parent
477f30e240
commit
13ee2443d2
|
|
@ -535,10 +535,7 @@ export class ModdedDex {
|
|||
delete childTypedData[entryId].inherit;
|
||||
|
||||
// Merge parent into children entry, preserving existing childs' properties.
|
||||
for (const key in parentTypedData[entryId]) {
|
||||
if (key in childTypedData[entryId]) continue;
|
||||
childTypedData[entryId][key] = parentTypedData[entryId][key];
|
||||
}
|
||||
childTypedData[entryId] = {...parentTypedData[entryId], ...childTypedData[entryId]};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user