From: Tim Düsterhus Date: Thu, 4 Mar 2021 12:59:02 +0000 (+0100) Subject: Fix preloading of perfect-scrollbar in Bootstrap.ts X-Git-Tag: 5.4.0_Alpha_1~199 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0162ff4556b302666de7dc72793de5c4ca87acd2;p=GitHub%2FWoltLab%2FWCF.git Fix preloading of perfect-scrollbar in Bootstrap.ts Apparently TypeScript does not emit the import of the imported variable is not used. Use the version without bindings to make the side effect clear. --- diff --git a/ts/WoltLabSuite/Core/Bootstrap.ts b/ts/WoltLabSuite/Core/Bootstrap.ts index 32a483c0e7..691f862264 100644 --- a/ts/WoltLabSuite/Core/Bootstrap.ts +++ b/ts/WoltLabSuite/Core/Bootstrap.ts @@ -28,8 +28,7 @@ import * as UiPageJumpTo from "./Ui/Page/JumpTo"; import * as UiPassword from "./Ui/Password"; // perfectScrollbar does not need to be bound anywhere, it just has to be loaded for WCF.js -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import perfectScrollbar from "perfect-scrollbar"; +import "perfect-scrollbar"; // non strict equals by intent if (window.WCF == null) { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js index 54a855db54..34cb04d5c4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js @@ -8,7 +8,7 @@ * @license GNU Lesser General Public License * @module WoltLabSuite/Core/Bootstrap */ -define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/Relative", "./Devtools", "./Dom/Change/Listener", "./Environment", "./Event/Handler", "./Language", "./StringUtil", "./Ui/Dialog", "./Ui/Dropdown/Simple", "./Ui/Mobile", "./Ui/Page/Action", "./Ui/TabMenu", "./Ui/Tooltip", "./Ui/Page/JumpTo", "./Ui/Password"], function (require, exports, tslib_1, Core, Picker_1, DateTimeRelative, Devtools_1, Listener_1, Environment, EventHandler, Language, StringUtil, Dialog_1, Simple_1, UiMobile, UiPageAction, UiTabMenu, UiTooltip, UiPageJumpTo, UiPassword) { +define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/Relative", "./Devtools", "./Dom/Change/Listener", "./Environment", "./Event/Handler", "./Language", "./StringUtil", "./Ui/Dialog", "./Ui/Dropdown/Simple", "./Ui/Mobile", "./Ui/Page/Action", "./Ui/TabMenu", "./Ui/Tooltip", "./Ui/Page/JumpTo", "./Ui/Password", "perfect-scrollbar"], function (require, exports, tslib_1, Core, Picker_1, DateTimeRelative, Devtools_1, Listener_1, Environment, EventHandler, Language, StringUtil, Dialog_1, Simple_1, UiMobile, UiPageAction, UiTabMenu, UiTooltip, UiPageJumpTo, UiPassword) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = void 0;