Skip to content

Commit

Permalink
Fix case where dispatch was missing (#41553)
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Oct 19, 2022
1 parent 9ac231a commit 4e40ba8
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -128,7 +128,7 @@ function performFullReload(err: any, sendMessage: any) {

// Attempt to update code on the fly, fall back to a hard reload.
function tryApplyUpdates(
onHotUpdateSuccess: any,
onHotUpdateSuccess: (hasUpdates: boolean) => void,
sendMessage: any,
dispatch: DispatchFn
) {
Expand Down Expand Up @@ -174,7 +174,7 @@ function tryApplyUpdates(
if (isUpdateAvailable()) {
// While we were updating, there was a new update! Do it again.
tryApplyUpdates(
hasUpdates ? onBuildOk : onHotUpdateSuccess,
hasUpdates ? () => onBuildOk(dispatch) : onHotUpdateSuccess,
sendMessage,
dispatch
)
Expand Down

0 comments on commit 4e40ba8

Please sign in to comment.