Skip to content

Commit

Permalink
fix: server not have window (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Jul 29, 2023
1 parent 993b058 commit 4389423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useHMR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if (
process.env.NODE_ENV !== 'production' &&
typeof module !== 'undefined' &&
module &&
module.hot
(module as any).hot &&
typeof window !== 'undefined'
) {
const win = window as any;
if (typeof win.webpackHotUpdate === 'function') {
Expand Down

0 comments on commit 4389423

Please sign in to comment.