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? :)
This commit is contained in:
Brion Vibber 2011-01-06 16:36:57 -08:00
parent 7ec456198a
commit f97380fdb5
1 changed files with 1 additions and 1 deletions

View 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;
}