fix: fill upgrades array with empty strings #1023

Merged
OrdisPrime merged 1 commits from null-upgrade into main 2025-02-25 17:31:17 -08:00

View File

@ -544,6 +544,9 @@ export const applyDefaultUpgrades = (
for (const defaultUpgrade of defaultUpgrades) { for (const defaultUpgrade of defaultUpgrades) {
modsToGive.push({ ItemType: defaultUpgrade.ItemType, ItemCount: 1 }); modsToGive.push({ ItemType: defaultUpgrade.ItemType, ItemCount: 1 });
if (defaultUpgrade.Slot != -1) { if (defaultUpgrade.Slot != -1) {
while (upgrades.length < defaultUpgrade.Slot) {
upgrades.push("");
}
upgrades[defaultUpgrade.Slot] = defaultUpgrade.ItemType; upgrades[defaultUpgrade.Slot] = defaultUpgrade.ItemType;
} }
} }