Skip to content

Commit

Permalink
fix: catalogue list view crash
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzkirstein committed Mar 7, 2024
1 parent 9e782b0 commit f0f6bf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/@types/AssetExtended.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Asset } from '@oceanprotocol/lib'
import { Asset, Metadata } from '@oceanprotocol/lib'

// declaring into global scope to be able to use this as
// ambiant types despite the above imports
declare global {
interface AssetExtended extends Asset {
accessDetails?: AccessDetails
views?: number
metadata: MetadataExtended
metadata: Metadata
services: ServiceExtended[]
}
}
6 changes: 4 additions & 2 deletions src/components/@shared/AssetList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ const columns: TableOceanColumn<AssetExtended>[] = [
return (
<AssetType
className={styles.typeLabel}
type={metadata.additionalInformation.saas ? 'saas' : metadata.type}
accessType={metadata.additionalInformation.saas ? 'saas' : accessType}
type={metadata.additionalInformation?.saas ? 'saas' : metadata.type}
accessType={
metadata.additionalInformation?.saas ? 'saas' : accessType
}
/>
)
},
Expand Down

0 comments on commit f0f6bf0

Please sign in to comment.