修复空组导致 cocos creator 编辑器崩溃

This commit is contained in:
onvia
2023-09-14 17:06:58 +08:00
parent 037e598d81
commit dbef180d51
3 changed files with 7 additions and 1 deletions

View File

@@ -1359,6 +1359,9 @@
return true;
}
resize() {
if (!this.children.length) {
return;
}
let left = Number.MAX_SAFE_INTEGER;
let right = Number.MIN_SAFE_INTEGER;
let top = Number.MAX_SAFE_INTEGER;