Skip to content

Commit

Permalink
fix: don't panic on empty files in node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 2, 2024
1 parent c9e68ce commit 40c299f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/pools/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function createMethodsRPC(project: WorkspaceProject): RuntimeRPC {
if ('id' in result && typeof result.id === 'string')
return { id: result.id as string }

if (!code)
if (code == null)
throw new Error(`Failed to fetch module ${id}`)

const dir = join(project.tmpDir, transformMode)
Expand Down

0 comments on commit 40c299f

Please sign in to comment.