Skip to content

Commit 281044c

Browse files
ocean90Copilot
andauthored
Check if form exists
Co-authored-by: Copilot <[email protected]>
1 parent 8141ad4 commit 281044c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/_enqueues/admin/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,8 +2361,8 @@ $( function( $ ) {
23612361
(function($){
23622362
const usersForm = document.querySelector( '.users-php .delete-and-reassign-users-form' );
23632363

2364-
// Check if the form contains any radio buttons.
2365-
if ( ! usersForm.querySelector( 'input[type="radio"]' ) ) {
2364+
// Check if the form exists and contains any radio buttons.
2365+
if ( ! usersForm || ! usersForm.querySelector( 'input[type="radio"]' ) ) {
23662366
return;
23672367
}
23682368

0 commit comments

Comments
 (0)