Skip to content

Commit

Permalink
fix(core): useWindowSize, resolves vueuse#28, thanks @rockmandash
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 8, 2020
1 parent bff92fe commit 4b00757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useWindowSize/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEventListener } from '../useEventListener'

export function useWindowSize (initialWidth = Infinity, initialHeight = Infinity) {
const width = ref(isClient ? window.innerWidth : initialWidth)
const height = ref(isClient ? window.innerWidth : initialHeight)
const height = ref(isClient ? window.innerHeight : initialHeight)

if (!isClient) {
useEventListener('resize', () => {
Expand Down

0 comments on commit 4b00757

Please sign in to comment.