You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The callback should be the same function that was passed to addListener() so this won’t work with anonymous function
This usage in the background function uses anonymous functions, and so the listeners aren't being removed. Since the background window is mounted and unmounted several times this results in several identical listeners being registered, a situation that's also called out in the docs
We’ve seen situations where apps would register addListener multiple times for the same event – this caused the event to be triggered multiple times and causes unexpected bugs and memory leaks. Please pay attention when registering to events and prevent it.
The text was updated successfully, but these errors were encountered:
This is the code being referenced in the background component
According to Overwolf docs
This usage in the background function uses anonymous functions, and so the listeners aren't being removed. Since the background window is mounted and unmounted several times this results in several identical listeners being registered, a situation that's also called out in the docs
The text was updated successfully, but these errors were encountered: