Skip to content

Commit

Permalink
fix(docz): remove window check from useCurrentDoc fixes doczjs#985
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Aug 25, 2019
1 parent efd61a3 commit 511e7f1
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 511e7f1

Please sign in to comment.