Skip to content

Commit 7e48117

Browse files
n3trianschmitz
andauthored
fix: page doesn't get refreshed when FAST_REFRESH=false (facebook#9884)
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
1 parent b5fdadd commit 7e48117

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-dev-utils/webpackHotDevClient.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ function tryApplyUpdates(onHotUpdateSuccess) {
243243
}
244244

245245
function handleApplyUpdates(err, updatedModules) {
246-
const hasReactRefresh = process.env.FAST_REFRESH !== 'false';
246+
// NOTE: This var is injected by Webpack's DefinePlugin, and is a boolean instead of string.
247+
const hasReactRefresh = process.env.FAST_REFRESH;
247248
const wantsForcedReload = err || !updatedModules || hadRuntimeError;
248249
// React refresh can handle hot-reloading over errors.
249250
if (!hasReactRefresh && wantsForcedReload) {

0 commit comments

Comments
 (0)