We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51bb60f commit ac94414Copy full SHA for ac94414
src/core/utils.ts
@@ -91,11 +91,8 @@ export function deepIncludes(a: any, b: any): boolean {
91
92
export function isDocumentVisible(): boolean {
93
const visibilityState = document?.visibilityState as any
94
- return (
95
- visibilityState === undefined ||
96
- visibilityState === 'visible' ||
97
- visibilityState === 'prerender'
98
- )
+
+ return [undefined, 'visible', 'prerender'].includes(visibilityState)
99
}
100
101
export function isOnline(): boolean {
0 commit comments