pending
is set to true
even when there are no "pendingInvokes" in debounce
#5633
Labels
issue bankruptcy
Closing the issue/PR to start fresh
This is more of a question which may possibly be a bug.
I was using the debouce function present on master specifically for the feature of
pending
.The question is: Considering that a function
log
is debounced withleading: true
, generatinglogDebounced
. IflogDebounced
is called only once, during thewait
period, should pending betrue
orfalse
?Currently it outputs
true
, but I believe that if there are no "pending invokes" it should outputfalse
. This would be helpful in cases where we are watching this variable to block navigation/show a loading state, since no more calls would be made we shouldn't need to wait for thewait
time to expire.The example in code is
The text was updated successfully, but these errors were encountered: