We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34675d4 commit eceffccCopy full SHA for eceffcc
packages/node_modules/overmind-react/src/index.ts
@@ -41,7 +41,9 @@ export const createHook = <A extends Overmind<Configuration>>(overmind: A) => {
41
ReactCurrentOwner,
42
} = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
43
const useCurrentComponent = () => {
44
- return ReactCurrentOwner.current
+ return ReactCurrentOwner &&
45
+ ReactCurrentOwner.current &&
46
+ ReactCurrentOwner.current.elementType
47
? ReactCurrentOwner.current.elementType
48
: {}
49
}
0 commit comments