Skip to content
This repository was archived by the owner on Oct 3, 2020. It is now read-only.

Commit 3a2f2e1

Browse files
authored
Merge pull request #3 from dan-kwiat/fix-iso-effect
fix(hooks): check if window is 'undefined' instead of 'function'
2 parents b71f3fd + d3188b5 commit 3a2f2e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/use-iso-morphic-effect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import * as React from 'react'
22

33
export const useIsoMorphicEffect =
4-
typeof window !== 'function' ? React.useLayoutEffect : React.useEffect
4+
typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect

0 commit comments

Comments
 (0)