Closed jonathanlloyd closed 5 years ago
The onSuccess method was not returning the promise from .clear on line 26: https://github.com/pusher/push-notifications-web/pull/15/files#diff-8160ad4db965670fc8045a32fe2b7a71L26 This meant that resolve could be called before the state was cleared
.clear
resolve
I don't understand the race condition. It seems like you just define the onerror later. Can you update the PR description to explain what the problem was?
I don't understand the race condition. It seems like you just define the onerror later.
onerror
Can you update the PR description to explain what the problem was?
Done
The onSuccess method was not returning the promise from
.clear
on line 26: https://github.com/pusher/push-notifications-web/pull/15/files#diff-8160ad4db965670fc8045a32fe2b7a71L26 This meant thatresolve
could be called before the state was cleared