Fix wrong "in" of undefined

This commit is contained in:
Adria Navarro 2024-12-29 12:50:17 +01:00
parent 0d64ce42f1
commit 6aedc25392
1 changed files with 1 additions and 5 deletions

View File

@ -133,11 +133,7 @@ export const deriveStores = (context: StoreContext): DerivedDatasourceStore => {
type = ($datasource as any).value?.datasource?.type type = ($datasource as any).value?.datasource?.type
} }
// Handle calculation views // Handle calculation views
if ( if (type === "viewV2" && $definition?.type === ViewV2Type.CALCULATION) {
type === "viewV2" &&
"type" in $definition &&
$definition?.type === ViewV2Type.CALCULATION
) {
return false return false
} }
return ["table", "viewV2", "link"].includes(type) return ["table", "viewV2", "link"].includes(type)