Skip to content

Commit

Permalink
fix: update model when the model has changed after exucuting multiple…
Browse files Browse the repository at this point in the history
… messages (regression)
  • Loading branch information
atheck committed Sep 25, 2023
1 parent 55202db commit 5e9d4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useElmish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function useElmish<TProps, TModel, TMessage extends Message>({
let modified = false;

do {
modified = handleMessage(nextMsg);
modified ||= handleMessage(nextMsg);

nextMsg = buffer.shift();
} while (nextMsg);
Expand Down

0 comments on commit 5e9d4ed

Please sign in to comment.