From bbf6e12a10d4748675ef46a570a2ed45a5205b2a Mon Sep 17 00:00:00 2001 From: CordonZeus22 Date: Mon, 25 Nov 2024 22:31:47 +0100 Subject: [PATCH] Revert excludedLocations modifications in OptConfigDataManager validate --- libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts b/libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts index 3f5d85291a..d6a3bd0184 100644 --- a/libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts +++ b/libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts @@ -95,7 +95,7 @@ export class OptConfigDataManager extends DataManager< if (key.startsWith('optConfig_') && !this.set(key, {})) this.database.storage.remove(key) } - override validate(obj: object): OptConfig | undefined { + override validate(obj: object, key: string): OptConfig | undefined { if (typeof obj !== 'object') return undefined let { artSetExclusion, @@ -153,7 +153,8 @@ export class OptConfigDataManager extends DataManager< excludedLocations = validateArr( excludedLocations, - allLocationCharacterKeys + allLocationCharacterKeys.filter((k) => k !== key), + [] ).filter( (lk) => this.database.chars.get(this.database.chars.LocationToCharacterKey(lk)) // Remove characters who do not exist in the DB