Skip to content

Commit 6e8b5dc

Browse files
committed
TS: fix to prev change (failed test)
1 parent d26fa96 commit 6e8b5dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gridstack-engine.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ export class GridStackEngine {
324324
this.removedNodes.push(node);
325325
}
326326
node._id = null; // hint that node is being removed
327-
this.nodes.splice(this.nodes.findIndex(n => n === node), 1);
327+
// TODO: .splice(findIndex(),1) would be faster but apparently there are cases we have 2 instances ! (see spec 'load add new, delete others')
328+
this.nodes = this.nodes.filter(n => n !== node);
328329
if (!this.float) {
329330
this._packNodes();
330331
}

0 commit comments

Comments
 (0)