File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/toolkit/src/query/react Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1013,16 +1013,16 @@ export function buildHooks<Definitions extends EndpointDefinitions>({
1013
1013
)
1014
1014
1015
1015
const { requestId } = promise || { }
1016
- const initialSelector = useMemo (
1016
+ const selectDefaultResult = useMemo (
1017
1017
( ) => select ( { fixedCacheKey, requestId : promise ?. requestId } ) ,
1018
1018
[ fixedCacheKey , promise , select ]
1019
1019
)
1020
1020
const mutationSelector = useMemo (
1021
1021
( ) =>
1022
1022
selectFromResult
1023
- ? createSelector ( [ initialSelector ] , selectFromResult )
1024
- : initialSelector ,
1025
- [ selectFromResult , initialSelector ]
1023
+ ? createSelector ( [ selectDefaultResult ] , selectFromResult )
1024
+ : selectDefaultResult ,
1025
+ [ selectFromResult , selectDefaultResult ]
1026
1026
)
1027
1027
1028
1028
const currentState = useSelector ( mutationSelector , shallowEqual )
You can’t perform that action at this time.
0 commit comments