I face some errors where sometimes the modelInfo is not available to access.
Note :
modelInfo?.value.model_owner
const summaryItems = ref({
title: "Model Summary",
items: {
"Model Owner": getFullName(modelInfo?.value.model_owner),
},
});
How do I add a null-check to modelInfo before accessing them ?
I would
do this if I was in the block of codes :
if (modelInfo) {
...
}
and this if I was setting the value of the property
modelInfo || '';
... but I wasn't sure what to do in my case/situation