From: Alexander Ebert Date: Sat, 30 May 2015 21:41:02 +0000 (+0200) Subject: Fixed minor issue in `WoltLab/WCF/Controller/Clipboard` X-Git-Tag: 3.0.0_Beta_1~2297 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ffe4079dd981ec9652cb9ae14bb983d4450e574c;p=GitHub%2FWoltLab%2FWCF.git Fixed minor issue in `WoltLab/WCF/Controller/Clipboard` --- 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');