Skip to content

Commit 13af4cc

Browse files
committed
Slightly neater.
1 parent 4343e24 commit 13af4cc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/compat/wordpress-7.0/command-palette.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ function gutenberg_add_admin_bar_script() {
9090
);
9191
$script = <<<JS
9292
(( shortCutLabels ) => {
93-
let userAgent = '';
9493
// Assigning agent may error if the HTTP header is blocked at the browser level.
9594
try {
96-
userAgent = navigator.userAgent;
95+
const userAgent = navigator.userAgent;
9796
} catch (error) {
9897
// Make no change to the default shortcut label.
9998
return;

0 commit comments

Comments
 (0)