fix possible js error

This commit is contained in:
Yuri Kuznetsov
2025-06-18 16:04:16 +03:00
parent 58c1071f59
commit c46cf70079
+5 -1
View File
@@ -209,9 +209,13 @@ class ListTreeRecordItemView extends View {
checkLastChildren() {
Espo.Ajax
.getRequest(this.collection.entityType + '/action/lastChildrenIdList', {parentId: this.model.id})
.then(idList =>{
.then(idList => {
const childrenView = this.getChildrenView();
if (!childrenView) {
return;
}
idList.forEach(id => {
const model = this.model.get('childCollection').get(id);