fix(f6.1): make active operator selection build-safe
This commit is contained in:
@@ -178,7 +178,7 @@ export function AssetEditorPage() {
|
|||||||
setOperationalCompanies(loadedCompanies);
|
setOperationalCompanies(loadedCompanies);
|
||||||
setOperatorCompanyId((current) => loadedCompanies.some((company) => company.id === current)
|
setOperatorCompanyId((current) => loadedCompanies.some((company) => company.id === current)
|
||||||
? current
|
? current
|
||||||
: loadedCompanies.length === 1 ? loadedCompanies[0].id : '');
|
: loadedCompanies.length === 1 ? (loadedCompanies[0]?.id ?? '') : '');
|
||||||
}).catch((requestError) => {
|
}).catch((requestError) => {
|
||||||
setOperationalCompanies([]);
|
setOperationalCompanies([]);
|
||||||
setOperatorCompanyId('');
|
setOperatorCompanyId('');
|
||||||
|
|||||||
Reference in New Issue
Block a user