From 3acd07c034b4f3e20b374949f0d929a547358ce9 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 10 Dec 2023 22:31:55 +0000 Subject: [PATCH] Update `cleanUpCompleteCraftsInProfile()` to handle when a hideout craft is cancelled by player value in kvp will be null --- project/src/routers/EventOutputHolder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/src/routers/EventOutputHolder.ts b/project/src/routers/EventOutputHolder.ts index 21a3d56b..7739a6d2 100644 --- a/project/src/routers/EventOutputHolder.ts +++ b/project/src/routers/EventOutputHolder.ts @@ -196,14 +196,14 @@ export class EventOutputHolder for (const productionKey in productions) { const production = productions[productionKey]; - if (production.sptIsComplete && production.sptIsContinuous) + if (production?.sptIsComplete && production?.sptIsContinuous) { // Water collector / Bitcoin etc production.sptIsComplete = false; production.Progress = 0; production.StartTimestamp = this.timeUtil.getTimestamp(); } - else if (!production.inProgress) + else if (!production?.inProgress) { // Normal completed craft, delete delete productions[productionKey];