Skip to content

Commit

Permalink
fix(docz): remove window check from useCurrentDoc fixes #985 (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Aug 27, 2019
1 parent 6dbe4b5 commit b90ea82
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/docz/src/hooks/useCurrentDoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { get } from 'lodash/fp'
import { doczState } from '../state'

export const useCurrentDoc = () => {
if (typeof window === 'undefined') return null
const state = useContext(doczState.context)
return get('currentEntry.value', state)
}

0 comments on commit b90ea82

Please sign in to comment.