zouyf_dev #428
|
@ -127,7 +127,10 @@ export const removePropertyOf = function(obj){
|
|||
export function removeTree(list) {
|
||||
var this_ = this
|
||||
for (var i in list) {
|
||||
if (list[i].children.length == 0) {
|
||||
if (list[i].children == null) {
|
||||
delete list[i].children;
|
||||
}
|
||||
else if (list[i].children.length == 0) {
|
||||
list[i].children = undefined
|
||||
} else {
|
||||
this_.removeTree(list[i].children)
|
||||
|
|
Loading…
Reference in New Issue