Skip to content

Commit

Permalink
Fix data:image/ handling in metadata views image source helper (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent authored Jul 15, 2024
1 parent e9c253a commit 3f9d2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const getImageSrcFromMetadataViewsFile = (file) => {
} else {
return getIPFSFileURL(file.cid.trim(), null)
}
} else if (file.url.includes('data:image/')) {
} else if (file.url && file.url.includes('data:image/')) {
return file.url
} else {
return "/token_placeholder.png"
Expand Down Expand Up @@ -426,4 +426,4 @@ export const flowmapToName = (inscription) => {

export const flowmapDisplayName = (inscription) => {
return `${inscription}\nname: ${flowmapToName(inscription)}`
}
}

0 comments on commit 3f9d2ce

Please sign in to comment.