Skip to content

Commit

Permalink
headerCommandPaletteButton undefined when JenkinsHeader not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Dec 20, 2024
1 parent 8f2800b commit dae326c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/js/components/command-palette/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ function init() {
const headerCommandPaletteButton = document.getElementById(
"button-open-command-palette",
);
if (headerCommandPaletteButton === null) {
return; // no JenkinsHeader, no h:searchbox
}
const commandPalette = document.getElementById("command-palette");
const commandPaletteWrapper = commandPalette.querySelector(
".jenkins-command-palette__wrapper",
Expand Down
5 changes: 5 additions & 0 deletions test/src/test/java/lib/layout/LayoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ public class LayoutTest {
}
}

@Test public void fullScreen() throws Exception {
// Example page using <l:layout type="full-screen">:
r.createWebClient().goTo("setupWizard/proxy-configuration");
}

}

0 comments on commit dae326c

Please sign in to comment.