Skip to content

Commit 6bc6878

Browse files
committed
fix(contracts): guard fileURLToPath call against non-string import.meta.url
1 parent e3b953b commit 6bc6878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/contracts/src/custom-network-signatures.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function getCurrentModulePath(): string | undefined {
6060
const moduleUrl = (import.meta as unknown as { url?: string } | undefined)
6161
?.url;
6262

63-
if (moduleUrl) {
63+
if (typeof moduleUrl === 'string') {
6464
try {
6565
return fileURLToPath(moduleUrl);
6666
} catch (error) {

0 commit comments

Comments
 (0)