Skip to content

Commit b0327b2

Browse files
committed
Remove unnecessary event type check
1 parent 822a4b5 commit b0327b2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/wp-includes/widgets/class-wp-widget-archives.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ public function widget( $args, $instance ) {
111111
<script>
112112
( ( dropdownId ) => {
113113
const dropdown = document.getElementById( dropdownId );
114-
function onSelectChange( event ) {
114+
function onSelectChange() {
115115
setTimeout( () => {
116-
if ( 'change' === event.type && 'escape' === dropdown.dataset.lastkey ) {
116+
if ( 'escape' === dropdown.dataset.lastkey ) {
117117
return;
118118
}
119119
if ( dropdown.value ) {

src/wp-includes/widgets/class-wp-widget-categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public function widget( $args, $instance ) {
9898
<script>
9999
( ( dropdownId ) => {
100100
const dropdown = document.getElementById( dropdownId );
101-
function onCatChange( event ) {
101+
function onCatChange() {
102102
setTimeout( () => {
103-
if ( 'change' === event.type && 'escape' === dropdown.dataset.lastkey ) {
103+
if ( 'escape' === dropdown.dataset.lastkey ) {
104104
return;
105105
}
106106
if ( dropdown.value && parseInt( dropdown.value ) > 0 && dropdown.parentElement instanceof HTMLSelectElement ) {

0 commit comments

Comments
 (0)