undefined check

This commit is contained in:
Asier Isayas 2025-02-14 14:58:12 -05:00
parent b8017763b7
commit cec621443d

View File

@ -129,8 +129,8 @@ async function readCollectionsWithARM(databaseId: string): Promise<DataModels.Co
// TO DO: Remove when we get RP API Spec with materializedViews
return rpResponse?.value?.map((collection: any) => {
const collectionDataModel: DataModels.Collection = collection.properties?.resource as DataModels.Collection;
collectionDataModel.materializedViews = collection.properties?.resource.materializedViews;
collectionDataModel.materializedViewDefinition = collection.properties?.resource.materializedViewDefinition;
collectionDataModel.materializedViews = collection.properties?.resource?.materializedViews;
collectionDataModel.materializedViewDefinition = collection.properties?.resource?.materializedViewDefinition;
return collectionDataModel;
});
}