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

View File

@@ -350,10 +350,12 @@
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) {
var child = that._items[key]; if (that._items.hasOwnProperty(key)) {
if(child.parent && child.parent.id === item.id) { var child = that._items[key];
delete that._items[key].treeList; if(child.parent && child.parent.id === item.id) {
delete that._items[key]; delete that._items[key].treeList;
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})