diff --git a/src/gridstack.js b/src/gridstack.js index 213ae87..cddc055 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -576,7 +576,9 @@ var maxHeight = 0; _.each(nodes, function(n) { if (n._id === null) { - n.el.remove(); + if (n.el) { + n.el.remove(); + } } else { n.el .attr('data-gs-x', n.x)