Skip to content

Commit

Permalink
allow hmr tests to correctly detect hmr event (#5469)
Browse files Browse the repository at this point in the history
### Description

This currently makes some hmr test flaky or broken
  • Loading branch information
sokra authored Jul 6, 2023
1 parent 006b5b1 commit ab72398
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ function handleSocketMessage(msg: ServerMessage) {
// This is used by the Next.js integration test suite to notify it when HMR
// updates have been completed.
// TODO: Only run this in test environments (gate by `process.env.__NEXT_TEST_MODE`)
if (globalThis.__NEXT_HMR_CB) {
if (aggregatedMsg.type !== "issues" && globalThis.__NEXT_HMR_CB) {
globalThis.__NEXT_HMR_CB();
globalThis.__NEXT_HMR_CB = null;
}
Expand Down

0 comments on commit ab72398

Please sign in to comment.