Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
at-github committed Nov 18, 2024
1 parent 4176292 commit 99988e3
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/services/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,27 @@ export const exportDatasets = async (
availability: datasetProperties.availability,
uri: datasetProperties.uri
}
const remoteDataset =
datasetProperties.id != null
? await store.load(datasetProperties.id)
: null
if (remoteDataset != null) {
try {
const remoteDataset =
datasetProperties.id != null
? await store.load(datasetProperties.id, { toasted: false })
: null

if (remoteDataset == null) return row

row.title = remoteDataset.title
row.uri = remoteDataset.page
row.description = remoteDataset.description
row.last_update = remoteDataset.last_update
row.organization = remoteDataset.organization?.name

return row
} catch (error) {
console.error(
`Unable to load datasetProperties: ${datasetProperties.id}`,
error
)
}
return row
})
)
const parser = new Parser({ fields: headers })
Expand Down

0 comments on commit 99988e3

Please sign in to comment.