Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e31d50e

Browse files
committed
check if element setup before detach
1 parent 67274f8 commit e31d50e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gridstack.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,9 @@
576576
var maxHeight = 0;
577577
_.each(nodes, function(n) {
578578
if (n._id === null) {
579-
n.el.remove();
579+
if (n.el) {
580+
n.el.remove();
581+
}
580582
} else {
581583
n.el
582584
.attr('data-gs-x', n.x)

0 commit comments

Comments
 (0)