Skip to content

Commit 193fa85

Browse files
Apply suggestions from code review
Co-authored-by: Weston Ruter <[email protected]>
1 parent 8d2a046 commit 193fa85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ public function widget( $args, $instance ) {
109109

110110
<?php ob_start(); ?>
111111
<script>
112-
(function( dropdownId ) {
113-
var dropdown = document.getElementById( dropdownId ), lastkey;
112+
(( dropdownId ) => {
113+
const dropdown = document.getElementById( dropdownId );
114114
function onSelectChange(e) {
115115
setTimeout(function() {
116-
lastKey = dropdown.getAttribute( 'data-lastkey' );
116+
const lastKey = dropdown.getAttribute( 'data-lastkey' );
117117
if ( 'change' === e.type && 'escape' === lastKey ) {
118118
return;
119119
}

0 commit comments

Comments
 (0)