From f20df3c0b77b7c23a956a365c5c4e96a389f5e63 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 1 Feb 2023 23:09:09 +0000 Subject: [PATCH] fix: ipfs parser null error --- src/lib/ipfs-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ipfs-parser.ts b/src/lib/ipfs-parser.ts index 872ef476..a860f1ff 100644 --- a/src/lib/ipfs-parser.ts +++ b/src/lib/ipfs-parser.ts @@ -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) => {