Files
NapCatQQ/.pnpm-store/v3/files/8b/ec5cf83b49c5596419e976784f60b5df943f6377250c6e691cc1b4d0496dca546a89f880fc4ba9ccbde55714483de1f069d9cb59843bb957af45900e924d8b
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

13 lines
420 B
Plaintext

/**
* 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
}