mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 04:21:11 +08:00
9 lines
192 B
TypeScript
9 lines
192 B
TypeScript
import { isBrowser } from './isBrowser';
|
|
|
|
export function isOnline(): boolean {
|
|
if (isBrowser && typeof navigator.onLine !== 'undefined') {
|
|
return navigator.onLine;
|
|
}
|
|
return true;
|
|
}
|