Skip to content

Commit

Permalink
fix: page doesn't get refreshed when FAST_REFRESH=false (#9884)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Schmitz <[email protected]>
  • Loading branch information
n3tr and ianschmitz authored Oct 26, 2020
1 parent b5fdadd commit 7e48117
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ function tryApplyUpdates(onHotUpdateSuccess) {
}

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

0 comments on commit 7e48117

Please sign in to comment.