From 85e7073977b0291ee547aaeb0fbc06977c1f8190 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 15 Apr 2021 10:02:24 +0200 Subject: [PATCH] Fix clearing of obsolete clipboard buttons --- ts/WoltLabSuite/Core/Controller/Clipboard.ts | 2 +- .../install/files/js/WoltLabSuite/Core/Controller/Clipboard.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 = ""; } -- 2.20.1