Skip to content

Commit

Permalink
fix(gridster): leaking options with multiple Gridster instances
Browse files Browse the repository at this point in the history
`defaults` was being overwritten.

See [jQuery documentation](http://api.jquery.com/jQuery.extend/):

> Keep in mind that the target object (first argument) will be modified, and will also be returned from $.extend().
  • Loading branch information
myabc authored and vieron committed Feb 7, 2014
1 parent ff51187 commit 07c7109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.gridster.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
* @constructor
*/
function Gridster(el, options) {
this.options = $.extend(true, defaults, options);
this.options = $.extend(true, {}, defaults, options);
this.$el = $(el);
this.$wrapper = this.$el.parent();
this.$widgets = this.$el.children(
Expand Down

0 comments on commit 07c7109

Please sign in to comment.