Skip to content

Commit e88c04c

Browse files
authoredJan 25, 2023
fix(vite-node): don't cache modules with timestamp: 0 (#2747)
1 parent 8c625d2 commit e88c04c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/vite-node/src/server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class ViteNodeServer {
130130
const module = this.server.moduleGraph.getModuleById(id)
131131
const timestamp = module ? module.lastHMRTimestamp : null
132132
const cache = this.fetchCache.get(filePath)
133-
if (timestamp !== null && cache && cache.timestamp >= timestamp)
133+
if (timestamp && cache && cache.timestamp >= timestamp)
134134
return cache.result
135135

136136
const time = Date.now()

0 commit comments

Comments
 (0)
Please sign in to comment.