From 293e3724a2c1e21bb7d4bd8338b29acca7af6502 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 31 Jul 2016 13:43:58 +0200 Subject: [PATCH] Fix potential error in UiPageAction.remove() --- .../install/files/js/WoltLab/WCF/Ui/Page/Action.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Action.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Action.js index 8314cd7d3b..12be9fa6e4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Action.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Action.js @@ -107,10 +107,15 @@ define(['Dictionary', 'Dom/Util'], function(Dictionary, DomUtil) { if (button !== undefined) { var listItem = button.parentNode; listItem.addEventListener('animationend', function () { - _container.removeChild(listItem); - _buttons.delete(buttonName); + try { + _container.removeChild(listItem); + _buttons.delete(buttonName); + } + catch (e) { + // ignore errors if the element has already been removed + } }); - + this.hide(buttonName); } }, -- 2.20.1