add null safety check

This commit is contained in:
Shireen Missi 2024-11-12 21:58:44 +00:00
parent 3e0c6cb3d2
commit 8024e5fc52
No known key found for this signature in database
GPG key ID: D213F10998FACC51

View file

@ -643,7 +643,7 @@ function simplifyProperty(property: any) {
(file: { type: string; [key: string]: any }) => file[file.type].url,
);
} else if (['status'].includes(property.type as string)) {
result = property[type].name;
result = property[type]?.name;
}
return result;
}