OneSignal-Website-SDK
OneSignal-Website-SDK copied to clipboard
[Bug]: after calling PushSubscription.optIn() the change event is fired twice (160001)
What happened?
On button click we call OneSignal.User.PushSubscription.optIn(), after that the OneSignal.User.PushSubscription change event is fired twice:
- The first time
current.idandcurrent.tokenonly have changed fromundefinedtonull - Shortly after this the event is fired again, now both
current.idandcurrent.tokenhave expected values
Since the first time the event is fired no actual changes were made, I expect this to be an error.
What browsers are you seeing the problem on?
Chrome (Chromium)
What operating system are you running?
W11
Steps to reproduce?
1. Clear site's data and permissions
2. Call `OneSignal.User.PushSubscription.optIn();`
What did you expect to happen?
I expected the event to only be fired once
Relevant log output
See screenshot attached
@lmeurs Thanks for reporting!
We have reproduce this one and are working on a fix.
Hi @jkasten2, thank you for confirming the issue! Do you have an update for us? Can you give an estimate when this will be picked up / fixed?