]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix regression in last year's update of InfiniteScroll -- having debug off caused...
authorBrion Vibber <brion@pobox.com>
Fri, 7 Jan 2011 00:36:57 +0000 (16:36 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 7 Jan 2011 00:36:57 +0000 (16:36 -0800)
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

index ec31bb0863af40b06a27f6ab18ef408f7dceab8f..dd61f8b18af9a49f43b0edf2f1edfac6849fd9a2 100644 (file)
@@ -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;
         }