Skip to content

Commit

Permalink
fix(web): removeListeners should actually remove listeners (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdoudeng committed May 30, 2022
1 parent 60d712c commit 60e9e38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/nativeModule.web.ts
Expand Up @@ -269,8 +269,8 @@ const RNCNetInfo: NetInfoNativeModule = {
if (connection) {
connection.removeEventListener('change', nativeHandler);
} else {
window.addEventListener('online', nativeHandler);
window.addEventListener('offline', nativeHandler);
window.removeEventListener('online', nativeHandler);
window.removeEventListener('offline', nativeHandler);
}

// Remove handlers
Expand Down

0 comments on commit 60e9e38

Please sign in to comment.