Skip null production objects inside handleRecipe()
This commit is contained in:
parent
68ad264be5
commit
6cf91ad923
@ -652,7 +652,7 @@ export class HideoutController
|
|||||||
let counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting];
|
let counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting];
|
||||||
if (!counterHoursCrafting)
|
if (!counterHoursCrafting)
|
||||||
{
|
{
|
||||||
pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting] = { "id": HideoutController.nameBackendCountersCrafting, "value": 0 };
|
pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting] = { id: HideoutController.nameBackendCountersCrafting, value: 0 };
|
||||||
counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting];
|
counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting];
|
||||||
}
|
}
|
||||||
let hoursCrafting = counterHoursCrafting.value;
|
let hoursCrafting = counterHoursCrafting.value;
|
||||||
@ -680,6 +680,12 @@ export class HideoutController
|
|||||||
let prodId: string;
|
let prodId: string;
|
||||||
for (const x of entries)
|
for (const x of entries)
|
||||||
{
|
{
|
||||||
|
// Skip null production objects
|
||||||
|
if (!x[1])
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.hideoutHelper.isProductionType(x[1])) // Production or ScavCase
|
if (this.hideoutHelper.isProductionType(x[1])) // Production or ScavCase
|
||||||
{
|
{
|
||||||
if ((x[1] as Production).RecipeId === request.recipeId)
|
if ((x[1] as Production).RecipeId === request.recipeId)
|
||||||
|
Loading…
Reference in New Issue
Block a user