Skip to content

Commit

Permalink
fix: minor issue when tab is unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
SaulMoro committed Jan 24, 2024
1 parent ae56d67 commit 2fe5dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngrx-rtk-query/src/lib/create-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const createApi: CreateApi<typeof coreModuleName | typeof angularHooksMod
const reducerPath = options.reducerPath as string;
const getState = () => {
const storeState = _getState();
return storeState[reducerPath]
return storeState?.[reducerPath]
? storeState
: // Query inside forFeature (Code splitting)
{ [reducerPath]: storeState };
Expand Down

0 comments on commit 2fe5dfa

Please sign in to comment.