diff --git a/packages/vite-node/src/server.ts b/packages/vite-node/src/server.ts index 9a067208406e..434665b56cc6 100644 --- a/packages/vite-node/src/server.ts +++ b/packages/vite-node/src/server.ts @@ -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()