Skip to content

Commit 36aa855

Browse files
committed
refactor: wip
1 parent 560b1e7 commit 36aa855

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/src/lib/import-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function toFileUrl(filepath: string): string {
3434
if (windowsAbsolutePathMatch) {
3535
const [, drive, rest] = windowsAbsolutePathMatch;
3636
// Normalize backslashes to forward slashes and construct file URL manually
37-
const normalizedPath = `${drive}${rest.replace(/\\/g, '/')}`;
37+
const normalizedPath = `${drive}${rest?.replace(/\\/g, '/')}`;
3838
return `file:///${normalizedPath}`;
3939
}
4040
return pathToFileURL(filepath).href;

0 commit comments

Comments
 (0)