Skip to content

Commit

Permalink
Document internal property usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed May 23, 2023
1 parent 15b964f commit 7cc91b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/data/src/redux-store/metadata/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ export function getCachedResolvers( state ) {
*/
export function hasResolvingSelectors( state ) {
return Object.values( state ).some( ( selectorState ) =>
/**
* This uses the internal `_map` property of `EquivalentKeyMap` for
* optimization purposes, since the `EquivalentKeyMap` implementation
* does not support a `.some()` implementation.
*
* @see https://github.com/aduth/equivalent-key-map
*/
[ ...selectorState._map.values() ].some(
( resolution ) => resolution[ 1 ]?.status === 'resolving'
)
Expand Down

0 comments on commit 7cc91b6

Please sign in to comment.