Skip to content

Commit 8117bd1

Browse files
committed
Replace setTimeout with the wp.domReady
1 parent 04e24d2 commit 8117bd1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/js/_enqueues/admin/site-health.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ jQuery( function( $ ) {
5555
}
5656
} );
5757

58-
// Get hash from query string and open the related accordion.
59-
setTimeout( function() {
58+
/* global setTimeout */
59+
wp.domReady( function() {
60+
// Get hash from query string and open the related accordion.
6061
var hash = window.location.hash;
6162

6263
if ( hash ) {
@@ -66,7 +67,7 @@ jQuery( function( $ ) {
6667
requestedPanel.trigger( 'click' );
6768
}
6869
}
69-
}, 100 );
70+
} );
7071

7172
// Site Health test handling.
7273

0 commit comments

Comments
 (0)