From 6b85f449dc51849c60d9f16e97153359e91cb16f Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 24 Feb 2015 21:31:29 +0100 Subject: [PATCH] $.inArray(...) was always evaluated as true >= 0 because index entries start at 0 (if not found, inArray returns -1) --- js/dom-functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dom-functions.js b/js/dom-functions.js index 6b1d674..88518b2 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -945,7 +945,7 @@ function expand_queet(q,doScrolling) { // attachments in the content link to /attachment/etc url and not direct to image/video, link is in title if(typeof attachment_title != 'undefined') { // images - if($.inArray(attachment_mimetype, ['image/gif', 'image/jpeg', 'image/png'])) { + if($.inArray(attachment_mimetype, ['image/gif', 'image/jpeg', 'image/png']) >= 0) { if(q.children('.queet').find('.expanded-content').children('.media').children('a[href="' + attachment_title + '"]').length < 1) { // not if already showed // local attachment with a thumbnail