[develop]: Fix check in belongsTo class.

This commit is contained in:
Konstantinos Triantafyllou 2024-06-03 15:59:25 +03:00
parent 2d9141d5c1
commit f8186cb2ea
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ export class BelongsTo {
if (field) {
field = Object.assign({}, field);
let json: any = element;
if (field.path.length > 0) {
if (field.path.length > 0 && json) {
if (Array.isArray(json)) {
return json.findIndex(value => BelongsTo.check(value, field)) != -1;
} else {