From 2749be9a4bd13666488d8414541690badc5c5136 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 21 Nov 2024 16:21:19 +0000 Subject: [PATCH] Fixed client error caused by server providing an invalid mongo_id for `nameTaskConditionCountersCraftingId` --- project/src/controllers/HideoutController.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index 45552271..f1a4dac4 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -56,7 +56,7 @@ import { inject, injectable } from "tsyringe"; @injectable() export class HideoutController { /** Key used in TaskConditionCounters array */ - protected static nameTaskConditionCountersCrafting = "CounterHoursCrafting"; + protected static nameTaskConditionCountersCraftingId = "673f5d6fdd6ed700c703afdc"; protected hideoutConfig: IHideoutConfig; constructor( @@ -1051,16 +1051,16 @@ export class HideoutController { pmcData: IPmcData, recipe: IHideoutProduction, ): ITaskConditionCounter { - let counterHoursCrafting = pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCrafting]; + let counterHoursCrafting = pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCraftingId]; if (!counterHoursCrafting) { // Doesn't exist, create - pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCrafting] = { + pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCraftingId] = { id: recipe._id, - type: HideoutController.nameTaskConditionCountersCrafting, + type: HideoutController.nameTaskConditionCountersCraftingId, sourceId: "CounterCrafting", value: 0, }; - counterHoursCrafting = pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCrafting]; + counterHoursCrafting = pmcData.TaskConditionCounters[HideoutController.nameTaskConditionCountersCraftingId]; } return counterHoursCrafting; }