Skip to content

Commit

Permalink
fix: page doesn't get refreshed when FAST_REFRESH=false (facebook#9884)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
  • Loading branch information
2 people authored and wombleton committed Jun 1, 2021
1 parent 96713ac commit ecfdb76
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 ecfdb76

Please sign in to comment.