chore: adjust useVisibilityChange

This commit is contained in:
chenjiahan
2020-09-12 21:47:05 +08:00
parent 10cfb36636
commit 68817e3aba
4 changed files with 7 additions and 7 deletions
+1
View File
@@ -0,0 +1 @@
export const inBrowser = typeof window !== 'undefined';
+2 -1
View File
@@ -1,5 +1,6 @@
import { Ref, unref } from 'vue';
import { inBrowser, useEventListener } from '../useEventListener';
import { inBrowser } from '../shared';
import { useEventListener } from '../useEventListener';
export type UseClickAwayOptions = {
eventName?: string;
@@ -6,8 +6,7 @@ import {
onUnmounted,
onDeactivated,
} from 'vue';
export const inBrowser = typeof window !== 'undefined';
import { inBrowser } from '../shared';
let supportsPassive = false;
if (inBrowser) {