-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throttle does not throttle on first call #55
Comments
@seiyab do you have some input here? |
I reproduced it here. Calling throttled-function just single time just skips leading call and doesn't schedule first call. |
I'm sorry for the inconvenience 🙏 #56 |
This has been released in https://github.com/niksy/throttle-debounce/releases/tag/v4.0.1 Thanks @seiyab for fixing! |
The following declearation does not do anything if the function is called only once :
Essentially, I am expecting throttle to call the function at least once every
100 ms
(in this case), but the function never gets called.Using
debounce
won't work because, if the function is called many times, I want the function to throttle, not be debounced, but I don't want the function to be executed immediately; the first call should be debounced.The current implementation is in error to me.
The text was updated successfully, but these errors were encountered: