Skip to content

Commit 73bcbf0

Browse files
committed
Revert "Slightly neater." because it breaks all things scope related.
This reverts commit 25015a6.
1 parent 237d199 commit 73bcbf0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-includes/admin-bar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,10 @@ function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void {
984984
*/
985985
$script = <<<JS
986986
(( shortCutLabels ) => {
987+
let userAgent = '';
987988
// Assigning agent may error if the HTTP header is blocked at the browser level.
988989
try {
989-
const userAgent = navigator.userAgent;
990+
userAgent = navigator.userAgent;
990991
} catch (error) {
991992
// Make no change to the default shortcut label.
992993
return;

0 commit comments

Comments
 (0)