Skip to content

Commit 40c299f

Browse files
committed
fix: don't panic on empty files in node_modules
1 parent c9e68ce commit 40c299f

File tree

1 file changed

+1
-1
lines changed
  • packages/vitest/src/node/pools

1 file changed

+1
-1
lines changed

packages/vitest/src/node/pools/rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function createMethodsRPC(project: WorkspaceProject): RuntimeRPC {
3434
if ('id' in result && typeof result.id === 'string')
3535
return { id: result.id as string }
3636

37-
if (!code)
37+
if (code == null)
3838
throw new Error(`Failed to fetch module ${id}`)
3939

4040
const dir = join(project.tmpDir, transformMode)

0 commit comments

Comments
 (0)