From f97380fdb5c03557fc01ee8301f4c558e916d374 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 6 Jan 2011 16:36:57 -0800 Subject: [PATCH] Fix regression in last year's update of InfiniteScroll -- having debug off caused breakage due to bad code interpreting every variable as a selector, and jQuery then failing when passed 'false'. Note that the current version of the infinitescroll jquery plugin fixes this, but I'm not updating to it because the code's been altered from the upstream version, apparently to stop it from actually working as infinite scroll. WTF? :) --- plugins/InfiniteScroll/jquery.infinitescroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/InfiniteScroll/jquery.infinitescroll.js b/plugins/InfiniteScroll/jquery.infinitescroll.js index ec31bb0863..dd61f8b18a 100644 --- a/plugins/InfiniteScroll/jquery.infinitescroll.js +++ b/plugins/InfiniteScroll/jquery.infinitescroll.js @@ -21,7 +21,7 @@ // grab each selector option and see if any fail. function areSelectorsValid(opts){ for (var key in opts){ - if (key.indexOf && key.indexOf('Selector') && $(opts[key]).length === 0){ + if (key.indexOf && (key.indexOf('Selector') != -1) && $(opts[key]).length === 0){ debug('Your ' + key + ' found no elements.'); return false; } -- 2.39.5