From aa928ac43d127d061a0e95b05550ef97e9310d2d Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 9 Dec 2024 13:41:06 +0000 Subject: [PATCH] only purge inactive repeatables When `repeatableToChangeClone` exists --- project/src/controllers/RepeatableQuestController.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index b87a643e..46d41e0b 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -571,10 +571,6 @@ export class RepeatableQuestController { // Clone data before we send it to client const repeatableToChangeClone = this.cloner.clone(repeatablesInProfile); - - // Purge inactive repeatables - repeatableToChangeClone.inactiveQuests = []; - if (!repeatableToChangeClone) { // Unable to find quest being replaced const message = this.localisationService.getText("quest-unable_to_find_repeatable_to_replace"); @@ -583,6 +579,9 @@ export class RepeatableQuestController { return this.httpResponse.appendErrorToOutput(output, message); } + // Purge inactive repeatables + repeatableToChangeClone.inactiveQuests = []; + // Nullguard output.profileChanges[sessionID].repeatableQuests ||= [];