From a40a191ee8d02083d5e0ee8938b36d9ae46b8aae Mon Sep 17 00:00:00 2001 From: christianalfoni Date: Tue, 11 Dec 2018 00:04:30 +0100 Subject: [PATCH] fix(overmind-react): fix hook in production --- packages/node_modules/overmind-react/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/overmind-react/src/index.ts b/packages/node_modules/overmind-react/src/index.ts index 93363c68..75d03cf5 100644 --- a/packages/node_modules/overmind-react/src/index.ts +++ b/packages/node_modules/overmind-react/src/index.ts @@ -40,7 +40,9 @@ export const createHook = >(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 () => {