修复部分情况下开启节点树报错问题

This commit is contained in:
蜜糖时光-Next
2019-08-15 15:20:26 +08:00
parent 3cb2cca68f
commit 9cc74c2ae1
3 changed files with 3 additions and 3 deletions

View File

@@ -308,7 +308,7 @@ let app = new Vue({
setTimeout(() => {
if (!cc.Node.prototype.isLeaf) {
cc.js.getset(cc.Node.prototype, 'isLeaf', function () {
return this.childrenCount === 0;
return !this.children || this.childrenCount === 0;
}, function (value) {
}, false, true);