Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This:

```
   $.extend(defaults, options);
```
will overwrite the default variable with ```options```. So if there are two endless scrolls on the page, the 2nd endless scroll could receive 'dirty' defaults from the first call.

This:
```
$.extend({}, defaults, options);
```
won't do that.  It keeps defaults clean and separate from the intended options.
  • Loading branch information...
commit c776396528f673c51d1a1c6f5747c0f365d3c786 1 parent e053ee1
@jonstorer jonstorer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  js/jquery.endless-scroll.js
View
2  js/jquery.endless-scroll.js
@@ -64,7 +64,7 @@
ceaseFire: function() { return false; }
};
- var options = $.extend(defaults, options);
+ var options = $.extend({}, defaults, options);
var firing = true;
var fired = false;
Please sign in to comment.
Something went wrong with that request. Please try again.