From ffe4079dd981ec9652cb9ae14bb983d4450e574c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 30 May 2015 23:41:02 +0200 Subject: [PATCH] Fixed minor issue in `WoltLab/WCF/Controller/Clipboard` --- .../files/js/WoltLab/WCF/Controller/Clipboard.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js index d1545aad21..5fe631d18f 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js @@ -116,24 +116,17 @@ define( */ _initEditors: function() { var getTypes = function(editor) { - var tmp = null; - try { var types = editor.getAttribute('data-types'); if (typeof types === 'string') { - tmp = JSON.parse('{ "types": ' + types.replace(/'/g, '"') + '}'); + return JSON.parse('{ "types": ' + types.replace(/'/g, '"') + '}').types; } } catch (e) { throw new Error("Expected a valid 'data-type' attribute for element '" + DOMUtil.identify(editor) + "'."); } - return tmp.types; - if (types !== null) { - types = types.types; - } - - return types; + return []; }; var editors = document.getElementsByClassName('jsClipboardEditor'); -- 2.20.1