Skip to content

Commit

Permalink
Add null check before formatting download link
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcohen committed Oct 11, 2023
1 parent fce63ff commit 78d4a8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/models/DRBResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default class DRBResult {
))
)

const formattedDownloadLink = this.formatDownloadLink(downloadLink)
const formattedDownloadLink =
downloadLink && this.formatDownloadLink(downloadLink)

return !formattedDownloadLink?.download || !formattedDownloadLink?.url
? null
Expand Down

0 comments on commit 78d4a8f

Please sign in to comment.