File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,9 +88,9 @@ export function revalidateAll(
8888 const flagIndex = type === 'focus' ? 5 : 6 ;
8989 const now = timeNow ( ) ;
9090
91- for ( const entry of revalidators . values ( ) ) {
91+ revalidators . forEach ( ( entry ) => {
9292 if ( ! entry [ flagIndex ] ) {
93- continue ;
93+ return ;
9494 }
9595
9696 entry [ 1 ] = now ;
@@ -101,7 +101,7 @@ export function revalidateAll(
101101 if ( revalidator ) {
102102 Promise . resolve ( revalidator ( isStaleRevalidation ) ) . catch ( noop ) ;
103103 }
104- }
104+ } ) ;
105105}
106106
107107/**
Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ export const removeTimeout = (key: string): void => {
119119
120120export const clearAllTimeouts = ( ) => {
121121 // Clear native setTimeout timeouts first!
122- for ( const value of keyMap . values ( ) ) {
122+ keyMap . forEach ( ( value ) => {
123123 if ( Array . isArray ( value ) ) {
124124 clearTimeout ( value [ 0 ] ) ;
125125 }
126- }
126+ } ) ;
127127
128128 if ( timer ) {
129129 clearInterval ( timer ) ;
You can’t perform that action at this time.
0 commit comments