Skip to content

Commit

Permalink
fix(mixedModuleGraph): handle undefined id in getModulesByFile (vitej…
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Sep 26, 2024
1 parent 9470011 commit 768a50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/mixedModuleGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export class ModuleGraph {
}
if (ssrModules) {
for (const mod of ssrModules) {
if (!this._client.getModuleById(mod.id!)) {
if (mod.id == null || !this._client.getModuleById(mod.id)) {
result.add(this.getBackwardCompatibleBrowserModuleNode(mod)!)
}
}
Expand Down

0 comments on commit 768a50f

Please sign in to comment.