zouyf_dev #428

Merged
zouyf merged 3 commits from zouyf_dev into main 2024-12-13 16:52:41 +08:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 33287aad57 - Show all commits

View File

@ -127,7 +127,10 @@ export const removePropertyOf = function(obj){
export function removeTree(list) { export function removeTree(list) {
var this_ = this var this_ = this
for (var i in list) { 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 list[i].children = undefined
} else { } else {
this_.removeTree(list[i].children) this_.removeTree(list[i].children)