Fixed handling of legacy thumbnails
authorMarcel Werk <burntime@woltlab.com>
Sun, 8 Apr 2018 16:28:11 +0000 (18:28 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 8 Apr 2018 16:28:27 +0000 (18:28 +0200)
wcfsetup/install/files/js/WCF.Attachment.js

index 1381124a9b8974c7314c6bab7539d1c2dff3eebc..7d4602d340bd264e4a635db1fe2135645164495c 100644 (file)
@@ -100,7 +100,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                                var attachmentId = data.attributes[0] || 0;
                                if (images.hasOwnProperty(attachmentId)) {
                                        var thumbnail = data.attributes[2];
-                                       thumbnail = (thumbnail === true || thumbnail === 'true');
+                                       thumbnail = (thumbnail === true || thumbnail === 'true' || ~~thumbnail > 0);
                                        
                                        var image = elCreate('img');
                                        image.className = 'woltlabAttachment';