GoogleChromeLabs / GoogleChromeLabs/quicklink

Avoid Triggering Requests while offline

Open
#402 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11.3k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

QuickLink should avoid triggering Network requests when the device is offline.

It should be relatively easy to fix this by adding this code in the `checkConnection` function.

```
if("onLine" in navigator && !navigator.onLine) {
return new Error('Device is offline');
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.