Skip to content

Commit

Permalink
Revert excludedLocations modifications in OptConfigDataManager validate
Browse files Browse the repository at this point in the history
  • Loading branch information
CordonZeus22 committed Nov 25, 2024
1 parent e3ac376 commit bbf6e12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/gi/db/src/Database/DataManagers/OptConfigDataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bbf6e12

Please sign in to comment.