Skip to content

fix(patterns): max timeout for debouncer#1041

Merged
ynesteruk merged 3 commits intomainfrom
nesteruk/fix-max-timeout
Dec 1, 2025
Merged

fix(patterns): max timeout for debouncer#1041
ynesteruk merged 3 commits intomainfrom
nesteruk/fix-max-timeout

Conversation

@ynesteruk
Copy link
Contributor

Fixes executing debauncer's callback on maxWaitTime reached

@ynesteruk ynesteruk self-assigned this Dec 1, 2025
this.maxTimeout = undefined;
}
}, this.waitTime);
if (!this.maxTimeout) {
Copy link
Contributor Author

@ynesteruk ynesteruk Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block worked only firs time, since maxTimeout was newer cleared

@ynesteruk ynesteruk requested a review from alisey December 1, 2025 09:59
@ynesteruk ynesteruk changed the title fix(patterns): max timeout fix(patterns): max timeout for debouncer Dec 1, 2025
@AviVahl
Copy link
Contributor

AviVahl commented Dec 1, 2025

add a test...?
packages/patterns/src/test/debounce.unit.ts

@ynesteruk ynesteruk merged commit 1aaf1cb into main Dec 1, 2025
6 checks passed
@ynesteruk ynesteruk deleted the nesteruk/fix-max-timeout branch December 1, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants