From 2ea6b658fd9a93b759778f6195e5e86dd3d0d201 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 13 Jul 2024 10:58:46 +0100 Subject: [PATCH] Fixed `getBTC()` failing when `Production` area cannot be found (cherry picked from commit 77b42bfb2f0540c0fcb4c60fb84cdbcacd0965ad) --- project/src/helpers/HideoutHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/helpers/HideoutHelper.ts b/project/src/helpers/HideoutHelper.ts index 5b96db25..2fc7bae1 100644 --- a/project/src/helpers/HideoutHelper.ts +++ b/project/src/helpers/HideoutHelper.ts @@ -1138,7 +1138,7 @@ export class HideoutHelper ): void { // Get how many coins were crafted and ready to pick up - const craftedCoinCount = pmcData.Hideout.Production[HideoutHelper.bitcoinFarm].Products.length; + const craftedCoinCount = pmcData.Hideout.Production[HideoutHelper.bitcoinFarm]?.Products?.length ?? 0; if (!craftedCoinCount) { const errorMsg = this.localisationService.getText("hideout-no_bitcoins_to_collect");