Skip to content

Commit

Permalink
Fix renaming selector to unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jul 12, 2023
1 parent 01e74e4 commit f27946b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/data/src/redux-store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ export default function createReduxStore( key, options ) {
// Expose normalization method on the bound selector
// in order that it can be called when fullfilling
// the resolver.
boundSelector.normalizeArgs = selector.normalizeArgs;
boundSelector.__unstableNormalizeArgs =
selector.__unstableNormalizeArgs;

const resolver = resolvers[ selectorName ];

Expand Down Expand Up @@ -640,11 +641,11 @@ function mapSelectorWithResolver(
*/
function normalize( selector, args ) {
if (
selector.normalizeArgs &&
typeof selector.normalizeArgs === 'function' &&
selector.__unstableNormalizeArgs &&
typeof selector.__unstableNormalizeArgs === 'function' &&
args?.length
) {
return selector.normalizeArgs( args );
return selector.__unstableNormalizeArgs( args );
}
return args;
}

0 comments on commit f27946b

Please sign in to comment.