Skip to content

Commit

Permalink
fix image ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
cl199793 committed Jul 26, 2019
1 parent feaa2cc commit 031885f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/image/src/image-viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Mode = {
}
};
const isFirefox = !!window.navigator.userAgent.match(/firefox/i);
const isFirefox = typeof window !== 'undefined' && !!window.navigator.userAgent.match(/firefox/i);
const mousewheelEventName = isFirefox ? 'DOMMouseScroll' : 'mousewheel';
export default {
Expand Down

0 comments on commit 031885f

Please sign in to comment.