Update cleanUpCompleteCraftsInProfile()
to handle when a hideout craft is cancelled by player
value in kvp will be null
This commit is contained in:
parent
87a40b4d2a
commit
3acd07c034
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user