Skip to content

Commit f5bba9c

Browse files
committed
refactor(app/store): minor
1 parent 2ce6211 commit f5bba9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/store/enhancers/getStateWithSelector.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ export const getStateWithSelector = injectStoreExtension<{ getState: GetStateWit
1111
<State>(store: Store<State>) => {
1212
const getState = function <Result>(selector?: Selector<State, Result>) {
1313
const state = store.getState()
14-
return selector ? selector(state) : state
14+
if (selector) {
15+
return selector(state)
16+
}
17+
return state
1518
}
1619
return { getState }
1720
},

0 commit comments

Comments
 (0)