mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix indexOf returns -1
This commit is contained in:
parent
707152d82f
commit
51208fcd0c
@ -606,7 +606,8 @@ RED.group = (function() {
|
|||||||
for (var i=0; i<nodes.length; i++) {
|
for (var i=0; i<nodes.length; i++) {
|
||||||
n = nodes[i];
|
n = nodes[i];
|
||||||
n.dirty = true;
|
n.dirty = true;
|
||||||
var index = group.nodes.indexOf(n);
|
// TODO: Why Proxy indexOf returns -1 ?
|
||||||
|
var index = group.nodes.findIndex(function (node) { return node.id === n.id; });
|
||||||
group.nodes.splice(index,1);
|
group.nodes.splice(index,1);
|
||||||
if (reparent && parentGroup) {
|
if (reparent && parentGroup) {
|
||||||
n.g = group.g
|
n.g = group.g
|
||||||
|
Loading…
x
Reference in New Issue
Block a user