尝试修复 reloadData 调用时机不对导致的错误

This commit is contained in:
o.o.c.
2025-12-06 15:01:35 +08:00
parent bfcb19293a
commit a2e8438bd1
2 changed files with 3 additions and 2 deletions

View File

@@ -918,7 +918,7 @@ export class YXCollectionView extends Component {
* 刷新列表数据
*/
reloadData() {
if (this.node.activeInHierarchy && this.node.parent) {
if (this.node != null && this.node.activeInHierarchy && this.node.parent && this.layout != null) {
this._reloadData()
return
}

View File

@@ -3,5 +3,6 @@
"uuid": "d21c5c56-bc81-481d-b241-7ce394501071",
"creator": {
"version": "3.8.0"
}
},
"description": "开源版本"
}