This commit is contained in:
Nathan Bierema 2023-07-12 17:11:48 -04:00
parent d82cd1611a
commit 6a1fb4228b

View File

@ -89,7 +89,7 @@ export default function createDevTools<
constructor( constructor(
props: Props<S, A, MonitorState, MonitorAction>, props: Props<S, A, MonitorState, MonitorAction>,
context: { store?: EnhancedStore<S, A, MonitorState> }, context?: { store?: EnhancedStore<S, A, MonitorState> },
) { ) {
super(props, context); super(props, context);
@ -100,12 +100,12 @@ export default function createDevTools<
return; return;
} }
if (!props.store && !context.store) { if (!props.store && !context?.store) {
logError('NoStore'); logError('NoStore');
return; return;
} }
if (context.store) { if (context?.store) {
this.liftedStore = context.store.liftedStore; this.liftedStore = context.store.liftedStore;
} else { } else {
this.liftedStore = props.store!.liftedStore; this.liftedStore = props.store!.liftedStore;