Skip to content

Commit 3b021b2

Browse files
committed
rename for consistency
1 parent aa288a8 commit 3b021b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/toolkit/src/query/react/buildHooks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,16 +1013,16 @@ export function buildHooks<Definitions extends EndpointDefinitions>({
10131013
)
10141014

10151015
const { requestId } = promise || {}
1016-
const initialSelector = useMemo(
1016+
const selectDefaultResult = useMemo(
10171017
() => select({ fixedCacheKey, requestId: promise?.requestId }),
10181018
[fixedCacheKey, promise, select]
10191019
)
10201020
const mutationSelector = useMemo(
10211021
() =>
10221022
selectFromResult
1023-
? createSelector([initialSelector], selectFromResult)
1024-
: initialSelector,
1025-
[selectFromResult, initialSelector]
1023+
? createSelector([selectDefaultResult], selectFromResult)
1024+
: selectDefaultResult,
1025+
[selectFromResult, selectDefaultResult]
10261026
)
10271027

10281028
const currentState = useSelector(mutationSelector, shallowEqual)

0 commit comments

Comments
 (0)