Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature network connection #26

Merged
merged 12 commits into from
May 18, 2024

Conversation

swarajgolu
Copy link
Collaborator

📝 Description

Add a brief description

⛳️ Current behavior (updates)

Please describe the current behavior that you are modifying

🚀 New behavior

Please describe the behavior or changes this PR adds

💣 Is this a breaking change (Yes/No):

📝 Additional Information

@swarajgolu swarajgolu requested a review from opensrc0 April 30, 2024 09:53

globalThis.addEventListener('online', onlineOfflineHandler);
globalThis.addEventListener('offline', onlineOfflineHandler);
globalThis?.navigator.connection.addEventListener('change', networkChangeHandler);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of navigator, add ? before connection.

return () => {
globalThis.removeEventListener('online', onlineOfflineHandler);
globalThis.removeEventListener('offline', onlineOfflineHandler);
globalThis.navigator.connection.removeEventListener('change', networkChangeHandler);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add ? before connection

Signed-off-by: Himanshu Gupta <opensrc0@gmail.com>
@opensrc0 opensrc0 merged commit 66f51b5 into opensrc0:main May 18, 2024
0 of 2 checks passed
Copy link

🎉 This PR is included in version 1.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants