summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/UrlbarInput.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/urlbar/UrlbarInput.sys.mjs')
-rw-r--r--browser/components/urlbar/UrlbarInput.sys.mjs16
1 files changed, 7 insertions, 9 deletions
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 6aefd18f9c..96fc7b9301 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -2766,20 +2766,18 @@ export class UrlbarInput {
return;
}
- let url =
- element.dataset.command == "help"
- ? result.payload.helpUrl
- : element.dataset.url;
+ let url;
+ if (element.dataset.command == "help") {
+ url = result.payload.helpUrl;
+ }
+ url ||= element.dataset.url;
+
if (!url) {
return;
}
let where = this._whereToOpen(event);
- if (
- url &&
- result.type != lazy.UrlbarUtils.RESULT_TYPE.TIP &&
- where == "current"
- ) {
+ if (result.type != lazy.UrlbarUtils.RESULT_TYPE.TIP && where == "current") {
// Open non-tip help links in a new tab unless the user held a modifier.
// TODO (bug 1696232): Do this for tip help links, too.
where = "tab";