diff --git a/web-v2/src/pages/AssetEditorPage.tsx b/web-v2/src/pages/AssetEditorPage.tsx index 4efab33..e3acf00 100644 --- a/web-v2/src/pages/AssetEditorPage.tsx +++ b/web-v2/src/pages/AssetEditorPage.tsx @@ -178,7 +178,7 @@ export function AssetEditorPage() { setOperationalCompanies(loadedCompanies); setOperatorCompanyId((current) => loadedCompanies.some((company) => company.id === current) ? current - : loadedCompanies.length === 1 ? loadedCompanies[0].id : ''); + : loadedCompanies.length === 1 ? (loadedCompanies[0]?.id ?? '') : ''); }).catch((requestError) => { setOperationalCompanies([]); setOperatorCompanyId('');