From: Matthias Schmidt Date: Thu, 15 Apr 2021 08:02:24 +0000 (+0200) Subject: Fix clearing of obsolete clipboard buttons X-Git-Tag: 5.4.0_Alpha_1~88 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85e7073977b0291ee547aaeb0fbc06977c1f8190;p=GitHub%2FWoltLab%2FWCF.git Fix clearing of obsolete clipboard buttons --- diff --git a/ts/WoltLabSuite/Core/Controller/Clipboard.ts b/ts/WoltLabSuite/Core/Controller/Clipboard.ts index 9dde00d6c4..41c73fd20d 100644 --- a/ts/WoltLabSuite/Core/Controller/Clipboard.ts +++ b/ts/WoltLabSuite/Core/Controller/Clipboard.ts @@ -455,7 +455,7 @@ class ControllerClipboard { // clear editors this.editors.forEach((editor, typeName) => { - if (keepEditors.includes(typeName)) { + if (!keepEditors.includes(typeName)) { UiPageAction.remove(`wcfClipboard-${typeName}`); this.editorDropdowns.get(typeName)!.innerHTML = ""; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js index b78b952464..376120ad0b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard.js @@ -380,7 +380,7 @@ define(["require", "exports", "tslib", "../Ajax", "../Core", "../Dom/Change/List const keepEditors = Object.keys(data.returnValues.items || {}); // clear editors this.editors.forEach((editor, typeName) => { - if (keepEditors.includes(typeName)) { + if (!keepEditors.includes(typeName)) { UiPageAction.remove(`wcfClipboard-${typeName}`); this.editorDropdowns.get(typeName).innerHTML = ""; }