diff --git a/packages/data/src/redux-store/metadata/selectors.js b/packages/data/src/redux-store/metadata/selectors.js index 8e8f41ea7cada..22112b0802d15 100644 --- a/packages/data/src/redux-store/metadata/selectors.js +++ b/packages/data/src/redux-store/metadata/selectors.js @@ -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' )