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:
parent
7ec456198a
commit
f97380fdb5
@ -21,7 +21,7 @@
|
|||||||
// grab each selector option and see if any fail.
|
// grab each selector option and see if any fail.
|
||||||
function areSelectorsValid(opts){
|
function areSelectorsValid(opts){
|
||||||
for (var key in 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.');
|
debug('Your ' + key + ' found no elements.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user