From 7ed79e56721069e90686a52d11eb7430d4cbf96e Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Thu, 5 Dec 2013 22:10:14 -0200 Subject: [PATCH] fix(gridster): leaking options with multiple Gridster instances `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(). --- src/jquery.gridster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 9e20466ea..fa17e7909 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -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(