Refactor dex.loadData w/ spread syntax (#10639)

Results in fewer object shapes
This commit is contained in:
larry-the-table-guy 2024-10-29 08:07:40 -04:00 committed by GitHub
parent 477f30e240
commit 13ee2443d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]};
}
}
}