diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 81197da2c..887f5ad9e 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -38,6 +38,7 @@ Change log - fix [1229](https://github.com/gridstack/gridstack.js/issues/1229) `staticGrid` no longer disable oneColumnMode - fix [1195](https://github.com/gridstack/gridstack.js/issues/1195) options broken with ember hash helper - thanks [@btecu](https://github.com/btecu) - fix [1250](https://github.com/gridstack/gridstack.js/issues/1250) don't remove item from another grid +- fix [1261](https://github.com/gridstack/gridstack.js/issues/1261) `init()` clones passed options so second doesn't affect first one ## 1.1.1 (2020-03-17) diff --git a/src/gridstack.js b/src/gridstack.js index b95812f9a..18ebbcd84 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -2106,7 +2106,7 @@ var el = $(elOrString).get(0); if (!el) return; if (!el.gridstack) { - el.gridstack = new GridStack(el, opts); + el.gridstack = new GridStack(el, Utils.clone(opts)); } return el.gridstack };