From 3bd24038b6833e21e9573c14364b8149f6712689 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 21 May 2026 01:20:21 +0200 Subject: [PATCH] Update module/applications/dialogs/CompendiumBrowserSettings.mjs Co-authored-by: Carlos Fernandez --- module/applications/dialogs/CompendiumBrowserSettings.mjs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/module/applications/dialogs/CompendiumBrowserSettings.mjs b/module/applications/dialogs/CompendiumBrowserSettings.mjs index 8f819289..b0d83fb3 100644 --- a/module/applications/dialogs/CompendiumBrowserSettings.mjs +++ b/module/applications/dialogs/CompendiumBrowserSettings.mjs @@ -113,12 +113,8 @@ export default class CompendiumBrowserSettings extends HandlebarsApplicationMixi ? this.browserSettings.excludedPacks[source][packName].excludedDocumentTypes.includes(type) : false; - if (!this.browserSettings.excludedPacks[source]?.[packName]) { - if (!this.browserSettings.excludedPacks[source]) this.browserSettings.excludedPacks[source] = {}; - - this.browserSettings.excludedPacks[source][packName] = { excludedDocumentTypes: [] }; - } - + this.browserSettings.excludedPacks[source] ??= {}; + this.browserSettings.excludedPacks[source][packName] ??= { excludedDocumentTypes: [] }; this.browserSettings.excludedPacks[source][packName].excludedDocumentTypes = currentlyExcluded ? this.browserSettings.excludedPacks[source][packName].excludedDocumentTypes.filter(x => x !== type) : [...(this.browserSettings.excludedPacks[source][packName]?.excludedDocumentTypes ?? []), type];