Skip to content

Commit 1c4315a

Browse files
fix: avoid crashing on bogus unlockables by filtering them out
1 parent f617d91 commit 1c4315a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

components/inventory.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,11 @@ export function createInventory(
625625
),
626626
...getConfig<Unlockable[]>("SniperUnlockables", true),
627627
...getConfig<Unlockable[]>("VersusUnlockables", true),
628-
].filter((u) => u.Type !== "location") // locations not in inventory
628+
].filter(
629+
(u) =>
630+
u.Properties && // remove broken unlockables with no properties
631+
u.Type !== "location", // locations do not go in inventory
632+
)
629633

630634
let unlockables: Unlockable[] = allunlockables
631635

0 commit comments

Comments
 (0)