Skip to content

Commit 96bbd20

Browse files
jeffgamedevjeffgamedev
andauthored
Fix null reference exception in Util script. (#76)
Co-authored-by: jeffgamedev <[email protected]>
1 parent 2306353 commit 96bbd20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/Thirdweb/Core/Scripts/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static bool IsWebGLBuild()
110110

111111
public static string ReplaceIPFS(this string uri, string gateway = "https://gateway.ipfscdn.io/ipfs/")
112112
{
113-
if (uri.StartsWith("ipfs://"))
113+
if (!string.IsNullOrEmpty(uri) && uri.StartsWith("ipfs://"))
114114
return uri.Replace("ipfs://", gateway);
115115
else
116116
return uri;

0 commit comments

Comments
 (0)