Spaces:
Paused
Paused
Download node_modules/@reduxjs/toolkit/src/query/utils/isOnline.ts from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40reduxjs/toolkit/src/query/utils/isOnline.ts
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@reduxjs/toolkit/src/query/utils/isOnline.ts
-
curl -L -o isOnline.ts https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40reduxjs/toolkit/src/query/utils/isOnline.ts
420 Bytes
| /** | |
| * Assumes a browser is online if `undefined`, otherwise makes a best effort | |
| * @link https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine | |
| */ | |
| export function isOnline() { | |
| // We set the default config value in the store, so we'd need to check for this in a SSR env | |
| return typeof navigator === 'undefined' | |
| ? true | |
| : navigator.onLine === undefined | |
| ? true | |
| : navigator.onLine | |
| } | |