Skip to content

Commit d521ef5

Browse files
committed
Bit safer.
1 parent 19f41a7 commit d521ef5

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

dist/gridstack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,12 @@
336336
};
337337

338338
GridStackEngine.prototype.removeNode = function(node, detachNode) {
339+
detachNode = typeof detachNode === 'undefined' ? true : detachNode;
339340
this._removedNodes.push(_.clone(node));
340341
node._id = null;
341342
this.nodes = _.without(this.nodes, node);
342343
this._packNodes();
343-
if (typeof detachNode != 'undefined' && detachNode) {
344+
if (detachNode) {
344345
this._notify(node);
345346
}
346347
};

0 commit comments

Comments
 (0)