From 5f345c915c7132c294bf983329b45148234016b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 22 Jul 2021 14:56:37 +0200 Subject: [PATCH] Reference `COMPILER_TARGET_DEFAULT` without going via `globalThis` This is required, because the minifier will not detect it otherwise. --- ts/WoltLabSuite/Core/BootstrapFrontend.ts | 4 +++- .../install/files/js/WoltLabSuite/Core/BootstrapFrontend.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/BootstrapFrontend.ts b/ts/WoltLabSuite/Core/BootstrapFrontend.ts index 61c5f8f270..49ed6cca95 100644 --- a/ts/WoltLabSuite/Core/BootstrapFrontend.ts +++ b/ts/WoltLabSuite/Core/BootstrapFrontend.ts @@ -50,6 +50,8 @@ function _initUserPopover(): void { }); } +declare const COMPILER_TARGET_DEFAULT: boolean; + /** * Bootstraps general modules and frontend exclusive ones. */ @@ -85,7 +87,7 @@ export function setup(options: BoostrapOptions): void { BackgroundQueue.invoke(); } - if (globalThis.COMPILER_TARGET_DEFAULT) { + if (COMPILER_TARGET_DEFAULT) { UiUserIgnore.init(); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js index 474c1893f9..b1b97287d5 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js @@ -68,7 +68,7 @@ define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Co // invoke the queue roughly every 10th request or on demand BackgroundQueue.invoke(); } - if (globalThis.COMPILER_TARGET_DEFAULT) { + if (COMPILER_TARGET_DEFAULT) { UiUserIgnore.init(); } UiMessageUserConsent.init(); -- 2.20.1