Skip to content

Commit

Permalink
only notify if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirShintel committed Feb 19, 2024
1 parent 80c051e commit 4f276a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/throttledStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ export const createThrottledStore = (
return action()
}
try {
notifyAll()
if (pendingBroadcastNotification || !pendingObservableNotifications) {
notifyAll()
}
deferNotifications = true
const functionResult = await action()
return functionResult
Expand Down

0 comments on commit 4f276a3

Please sign in to comment.