File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/data/src/redux-store/metadata Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,15 @@ export function getCachedResolvers( state ) {
140140 * @return {boolean } True if one or more selectors are resolving, false otherwise.
141141 */
142142export function hasResolvingSelectors ( state ) {
143- return [ ...Object . values ( state ) ] . some ( ( selectorState ) =>
144- [ ...selectorState . _map . values ( ) ] . some (
143+ return Object . values ( state ) . some ( ( selectorState ) =>
144+ /**
145+ * This uses the internal `_map` property of `EquivalentKeyMap` for
146+ * optimization purposes, since the `EquivalentKeyMap` implementation
147+ * does not support a `.values()` implementation.
148+ *
149+ * @see https://github.com/aduth/equivalent-key-map
150+ */
151+ Array . from ( selectorState . _map . values ( ) ) . some (
145152 ( resolution ) => resolution [ 1 ] ?. status === 'resolving'
146153 )
147154 ) ;
You can’t perform that action at this time.
0 commit comments