Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#59355 new defect (bug)

TypeError: Cannot read properties of undefined (reading 'hasClass') in wp-auth-check.min.js

Reported by: chamois_blanc's profile chamois_blanc Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.3.1
Component: Security Keywords:
Focuses: javascript Cc:

Description

Here is the trace:

at
HTMLDocument.<anonymous>(.../wp-includes/js/wp-auth-check.min.js:2:655)
at
HTMLDocument.dispatch(.../wp-admin/load-scripts.php:2:39997)
at
v.handle(.../wp-admin/load-scripts.php:2:37968)
at
Object.trigger(.../wp-admin/load-scripts.php:2:70063)
at
HTMLDocument.<anonymous>(.../wp-admin/load-scripts.php:2:70665)
at
Function.each(.../wp-admin/load-scripts.php:2:3129)
at
e.<computed>.each(.../wp-admin/load-scripts.php:2:1594)
at
e.<computed>.trigger(.../wp-admin/load-scripts.php:2:70640)
at
Object.<anonymous>(https://wednesdaynighthop.com/wp-includes/js/heartbeat.min.js:2:2186)
at
c(.../wp-admin/load-scripts.php:2:25266)

Change History (1)

#1 @chamois_blanc
7 months ago

It's probably here:

                        if ( ! data['wp-auth-check'] && wrap.hasClass( 'hidden' ) && ! tempHidden ) {
                                show();
                        } else if ( data['wp-auth-check'] && ! wrap.hasClass( 'hidden' ) ) {
                                hide();
                        }

maybe use wrap?.hasClass() instead?

Note: See TracTickets for help on using tickets.