1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix jshint error in treeList

This commit is contained in:
Nick O'Leary 2021-04-29 14:09:21 +01:00
parent 1eb8f9ad97
commit 9886af3cec
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -350,12 +350,14 @@
delete that._items[item.id]; delete that._items[item.id];
if(item.depth === 0) { if(item.depth === 0) {
for(var key in that._items) { for(var key in that._items) {
if (that._items.hasOwnProperty(key)) {
var child = that._items[key]; var child = that._items[key];
if(child.parent && child.parent.id === item.id) { if(child.parent && child.parent.id === item.id) {
delete that._items[key].treeList; delete that._items[key].treeList;
delete that._items[key]; delete that._items[key];
} }
} }
}
that._data = that._data.filter(function(data) { return data.id !== item.id}) that._data = that._data.filter(function(data) { return data.id !== item.id})
} }
} }