Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Apr 27, 2024
1 parent 0445482 commit 13c4641
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions saltgui/static/scripts/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class Router {
// pForward = 0 --> normal navigation
// pForward = 1 --> back navigation using regular gui
// pForward = 2 --> back navigation using browser
goTo (pHash, pQuery = {}, pForward = 0, pEvent) {
goTo (pHash, pQuery = {}, pForward = 0, pEvent = null) {

// close the command-box when it is stil open
CommandBox.hideManualRun();
Expand Down Expand Up @@ -335,7 +335,10 @@ export class Router {
const parentQuery = Object.fromEntries(new URLSearchParams(search));
/* eslint-enable compat/compat */

const inNewWindow = pEvent?.altKey || pEvent?.ctrlKey;
let inNewWindow = false;
if (pEvent) {
inNewWindow = pEvent.altKey || pEvent.ctrlKey;
}

for (const route of this.pages) {
if (route.path !== pHash) {
Expand Down

0 comments on commit 13c4641

Please sign in to comment.