Skip to content

Commit d20fc91

Browse files
authored
Merge pull request #1262 from adumesny/develop
clone grid option
2 parents 3aba709 + e7fa77e commit d20fc91

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Change log
3838
- fix [1229](https://github.com/gridstack/gridstack.js/issues/1229) `staticGrid` no longer disable oneColumnMode
3939
- fix [1195](https://github.com/gridstack/gridstack.js/issues/1195) options broken with ember hash helper - thanks [@btecu](https://github.com/btecu)
4040
- fix [1250](https://github.com/gridstack/gridstack.js/issues/1250) don't remove item from another grid
41+
- fix [1261](https://github.com/gridstack/gridstack.js/issues/1261) `init()` clones passed options so second doesn't affect first one
4142

4243
## 1.1.1 (2020-03-17)
4344

src/gridstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@
21062106
var el = $(elOrString).get(0);
21072107
if (!el) return;
21082108
if (!el.gridstack) {
2109-
el.gridstack = new GridStack(el, opts);
2109+
el.gridstack = new GridStack(el, Utils.clone(opts));
21102110
}
21112111
return el.gridstack
21122112
};

0 commit comments

Comments
 (0)