fix: ipfs parser null error

This commit is contained in:
DIYgod
2023-02-01 23:09:09 +00:00
parent a30872e93a
commit f20df3c0b7
+1 -1
View File
@@ -10,7 +10,7 @@ export type ToGatewayConfig = {
export const toGateway = (url: string) => {
const ipfsUrl = toIPFS(url)
return ipfsUrl.replaceAll(IPFS_PREFIX, IPFS_GATEWAY)
return ipfsUrl?.replaceAll(IPFS_PREFIX, IPFS_GATEWAY)
}
export const toIPFS = (url: string) => {