Skip to content

Commit ac94414

Browse files
fix: Update utils.ts (TanStack#812)
1 parent 51bb60f commit ac94414

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/core/utils.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,8 @@ export function deepIncludes(a: any, b: any): boolean {
9191

9292
export function isDocumentVisible(): boolean {
9393
const visibilityState = document?.visibilityState as any
94-
return (
95-
visibilityState === undefined ||
96-
visibilityState === 'visible' ||
97-
visibilityState === 'prerender'
98-
)
94+
95+
return [undefined, 'visible', 'prerender'].includes(visibilityState)
9996
}
10097

10198
export function isOnline(): boolean {

0 commit comments

Comments
 (0)