@varlet/ui 2.9.5-alpha.1680773894800 → 2.9.5-alpha.1680801460533

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
241
241
  import './tooltip/style/index.mjs'
242
242
  import './uploader/style/index.mjs'
243
243
 
244
- const version = '2.9.5-alpha.1680773894800'
244
+ const version = '2.9.5-alpha.1680801460533'
245
245
 
246
246
  function install(app) {
247
247
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
160
160
  export * from './tooltip/index.mjs'
161
161
  export * from './uploader/index.mjs'
162
162
 
163
- const version = '2.9.5-alpha.1680773894800'
163
+ const version = '2.9.5-alpha.1680801460533'
164
164
 
165
165
  function install(app) {
166
166
  ActionSheet.install && app.use(ActionSheet)
@@ -6,7 +6,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
6
6
 
7
7
  import { useEventListener } from '@varlet/use';
8
8
  import { createApp, h, getCurrentInstance, isVNode, ref, onActivated, onDeactivated, Comment, Fragment } from 'vue';
9
- import { isArray } from '@varlet/shared';
9
+ import { inBrowser, isArray } from '@varlet/shared';
10
10
  export function pickProps(props, propsKey) {
11
11
  return Array.isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
12
12
  pickedProps[key] = props[key];
@@ -143,6 +143,10 @@ export function useValidation() {
143
143
  };
144
144
  }
145
145
  export function useRouteListener(cb) {
146
+ if (!inBrowser()) {
147
+ return;
148
+ }
149
+
146
150
  useEventListener(window, 'hashchange', cb);
147
151
  useEventListener(window, 'popstate', cb);
148
152
  }