Skip to content

Commit 4431526

Browse files
committed
changes suggested by westonruter
1 parent 0f8ad0d commit 4431526

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jQuery( function( $ ) {
4444
$( '.health-check-accordion' ).on( 'click', '.health-check-accordion-trigger', function() {
4545
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
4646

47-
if ( 'undefined' !== typeof $( this ).attr( 'id' ) ) {
48-
window.location.hash = $( this ).attr( 'id' );
47+
if ( $( this ).prop( 'id' ) ) {
48+
window.location.hash = $( this ).prop( 'id' );
4949
}
5050

5151
if ( isExpanded ) {
@@ -65,7 +65,7 @@ jQuery( function( $ ) {
6565
if ( hash ) {
6666
var requestedPanel = $( hash );
6767

68-
if ( requestedPanel.length ) {
68+
if ( requestedPanel.is( '.health-check-accordion-trigger' ) ) {
6969
requestedPanel.trigger( 'click' );
7070
}
7171
}

0 commit comments

Comments
 (0)