From bd0ba073d1f39179e2348d5813042cf94bd01a82 Mon Sep 17 00:00:00 2001 From: Andrei Radoi Date: Mon, 16 Mar 2020 10:35:11 +0200 Subject: [PATCH 1/2] Made '.initAll()' use a deep copy of the opts --- src/gridstack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gridstack.js b/src/gridstack.js index e9fa17d66..1584aa78e 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -2112,7 +2112,7 @@ var grids = []; $(selector).each(function(index, el) { if (!el.gridstack) { - el.gridstack = new GridStack(el, opts); + el.gridstack = new GridStack(el, JSON.parse(JSON.stringify(opts))); } grids.push(el.gridstack); }); From a6e39840b6a08dbc499ccbc875dfefc6b0f349df Mon Sep 17 00:00:00 2001 From: Andrei Radoi Date: Mon, 16 Mar 2020 15:06:16 +0200 Subject: [PATCH 2/2] Replaced JSON method with jQuery.extends --- src/gridstack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gridstack.js b/src/gridstack.js index 1584aa78e..ae580de51 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -2112,7 +2112,7 @@ var grids = []; $(selector).each(function(index, el) { if (!el.gridstack) { - el.gridstack = new GridStack(el, JSON.parse(JSON.stringify(opts))); + el.gridstack = new GridStack(el, Utils.clone(opts)); } grids.push(el.gridstack); });