From: Alexander Ebert Date: Fri, 23 Dec 2016 10:38:42 +0000 (+0100) Subject: Fixed embedded media w/o thumbnail X-Git-Tag: 3.0.0_RC_3~66 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=507b23f49afcea544eb5bb15c074239b4035de6b;p=GitHub%2FWoltLab%2FWCF.git Fixed embedded media w/o thumbnail --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabMedia.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabMedia.js index 21646f031e..7c3bb1acfa 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabMedia.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabMedia.js @@ -25,7 +25,13 @@ $.Redactor.prototype.WoltLabMedia = function() { var image = elCreate('img'); image.className = 'woltlabSuiteMedia' + float; //noinspection JSUnresolvedVariable - image.src = this.opts.woltlab.mediaUrl.replace(/&/, '&').replace('-123456789', data.attributes[0]).replace('thumbnail=void', 'thumbnail=' + data.attributes[1]); + image.src = this.opts.woltlab.mediaUrl.replace(/&/, '&').replace('-123456789', data.attributes[0]).replace('thumbnail=void', function () { + if (data.attributes[1]) { + return 'thumbnail=' + data.attributes[1]; + } + + return ''; + }); elData(image, 'media-id', data.attributes[0]); elData(image, 'media-size', data.attributes[1]);