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 Oct 13, 2023
1 parent 2c5dc7a commit b0b5b45
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 @@ -243,7 +243,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 @@ -643,11 +644,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 b0b5b45

Please sign in to comment.