From 17b7767a9eaf1203720a57b920ec9d35751533f9 Mon Sep 17 00:00:00 2001 From: bananarama92 <bananarama921@outlook.com> Date: Sun, 30 Mar 2025 15:00:36 +0200 Subject: [PATCH] BUG: Fix `CraftingLoad()` failing to properly handle nullish (i.e. unused) crafts --- BondageClub/Screens/Room/Crafting/Crafting.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BondageClub/Screens/Room/Crafting/Crafting.js b/BondageClub/Screens/Room/Crafting/Crafting.js index 5216b59b75..2280663adb 100644 --- a/BondageClub/Screens/Room/Crafting/Crafting.js +++ b/BondageClub/Screens/Room/Crafting/Crafting.js @@ -969,8 +969,12 @@ function CraftingLoad() { // Re-enable previously disabled items if the player now owns them for (const item of Player.Crafting) { + if (item == null) { + continue; + } + const asset = CraftingAssets[item.Item]?.[0]; - if (item?.Disabled && asset && InventoryAvailable(Player, item.Name, asset.DynamicGroupName)) { + if (item.Disabled && asset && InventoryAvailable(Player, item.Name, asset.DynamicGroupName)) { delete item.Disabled; } }