Skip to content

Commit

Permalink
fix(vite-node): don't cache modules with timestamp: 0 (#2747)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 25, 2023
1 parent 8c625d2 commit e88c04c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite-node/src/server.ts
Expand Up @@ -130,7 +130,7 @@ export class ViteNodeServer {
const module = this.server.moduleGraph.getModuleById(id)
const timestamp = module ? module.lastHMRTimestamp : null
const cache = this.fetchCache.get(filePath)
if (timestamp !== null && cache && cache.timestamp >= timestamp)
if (timestamp && cache && cache.timestamp >= timestamp)
return cache.result

const time = Date.now()
Expand Down

0 comments on commit e88c04c

Please sign in to comment.