Skip to content

Commit

Permalink
fix(overmind-react): fix hook in production
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Dec 10, 2018
1 parent fedfbae commit a40a191
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/node_modules/overmind-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export const createHook = <A extends Overmind<Configuration>>(overmind: A) => {
ReactCurrentOwner,
} = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
const useCurrentComponent = () => {
return ReactCurrentOwner.current.elementType
return ReactCurrentOwner.current
? ReactCurrentOwner.current.elementType
: {}
}

return () => {
Expand Down

0 comments on commit a40a191

Please sign in to comment.