Incorrect check for legacy attachment dimensions
authorAlexander Ebert <ebert@woltlab.com>
Wed, 1 Jul 2020 19:16:26 +0000 (21:16 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 1 Jul 2020 19:16:26 +0000 (21:16 +0200)
wcfsetup/install/files/js/WCF.Attachment.js

index d170624e2171c61fb039f547063ba8c4cfd168ef..1f9e31cb4c82e020cad52163925ca7efd629cb7b 100644 (file)
@@ -134,7 +134,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                                        var thumbnailWidth = ~~$('#' + this._editorId).data('redactor').opts.woltlab.attachmentThumbnailWidth;
                                        
                                        var thumbnail = data.attributes[2];
-                                       thumbnail = (thumbnail === true || thumbnail === 'true' || ~~thumbnail <= thumbnailWidth);
+                                       thumbnail = (thumbnail === true || thumbnail === 'true' || (~~thumbnail && ~~thumbnail <= thumbnailWidth));
                                        
                                        var image = elCreate('img');
                                        image.className = 'woltlabAttachment';