Skip to content

Feature network connection#26

Merged
opensrc0 merged 12 commits intoopensrc0:mainfrom
swarajgolu:feature_networkConnection
May 18, 2024
Merged

Feature network connection#26
opensrc0 merged 12 commits intoopensrc0:mainfrom
swarajgolu:feature_networkConnection

Conversation

@swarajgolu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

🎉 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