@thirdweb-dev/storage
Advanced tools
Comparing version
@@ -274,3 +274,9 @@ 'use strict'; | ||
const path = uri.replace(scheme, ""); | ||
return getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
try { | ||
const gatewayUrl = getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
return gatewayUrl; | ||
} catch (err) { | ||
console.warn(`The IPFS uri: ${path} is not valid.`); | ||
return undefined; | ||
} | ||
} | ||
@@ -277,0 +283,0 @@ |
@@ -274,3 +274,9 @@ 'use strict'; | ||
const path = uri.replace(scheme, ""); | ||
return getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
try { | ||
const gatewayUrl = getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
return gatewayUrl; | ||
} catch (err) { | ||
console.warn(`The IPFS uri: ${path} is not valid.`); | ||
return undefined; | ||
} | ||
} | ||
@@ -277,0 +283,0 @@ |
@@ -265,3 +265,9 @@ import CIDTool from 'cid-tool'; | ||
const path = uri.replace(scheme, ""); | ||
return getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
try { | ||
const gatewayUrl = getGatewayUrlForCid(schemeGatewayUrls[index], path, clientId); | ||
return gatewayUrl; | ||
} catch (err) { | ||
console.warn(`The IPFS uri: ${path} is not valid.`); | ||
return undefined; | ||
} | ||
} | ||
@@ -268,0 +274,0 @@ |
{ | ||
"name": "@thirdweb-dev/storage", | ||
"version": "2.0.5", | ||
"version": "2.0.6-nightly-f93bd325-20231129214354", | ||
"main": "dist/thirdweb-dev-storage.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/thirdweb-dev-storage.esm.js", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
163947
0.29%3843
0.47%2
100%