forked from phoenixframework/phoenix_live_view
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix singular throttle event dispatched two times
Relates to: phoenixframework#3097 So, in phoenixframework#3097 I changed the throttle behavior to also dispatch an event after the throttle time has passed to make sure that the last event is dispatched. However, this caused the event to be dispatched twice in the case that there was only one event in the first place. This fixes that, although the throttle code is still a bit of a mess and should probably be refactored completely at some point.
- Loading branch information
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters