diff --git a/src/_util/canUseDom.ts b/src/_util/canUseDom.ts deleted file mode 100644 index 496eaebd6..000000000 --- a/src/_util/canUseDom.ts +++ /dev/null @@ -1,8 +0,0 @@ -import isUndefined from 'lodash/isUndefined'; - -export const canUseDom = !!( - !isUndefined(window) && - !isUndefined(document) && - window.document && - window.document.createElement -); diff --git a/src/_util/supportsPassive.ts b/src/_util/supportsPassive.ts index a4b32a667..02232b702 100644 --- a/src/_util/supportsPassive.ts +++ b/src/_util/supportsPassive.ts @@ -1,9 +1,9 @@ import { ref } from 'vue'; -import { canUseDom } from './canUseDom'; +import { isBrowser } from '../shared'; export const supportsPassive = ref(false); -if (canUseDom) { +if (!isBrowser) { try { const opts = {}; Object.defineProperty(opts, 'passive', {