queleok / words-hunter

Basic word game implemented in TS. Rules are simple: get points for composing words from the given set of letters.
https://queleok.github.io/words-hunter/
MIT License
1 stars 0 forks source link

Results are stuck in the pending state after an attempt to resend failed words #43

Closed queleok closed 3 years ago

queleok commented 3 years ago

Describe the bug Sometimes when there were network issues and the user attempts to resend words that failed to be validated, the results are not updated properly after the last of such words is validated, and the pending state icon is displayed updated

queleok commented 3 years ago

I suspect a regression after the latest refactoring

queleok commented 3 years ago

Yep, found the issue: depletion callback is executed immediately without associating it with the queue object upon timer stop if there are no words pending validation by that moment, and the callback is not set explicitly in the resend event handler