diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2019-06-11 23:40:57 +0300 |
---|---|---|
committer | Sam Bigelow <sbigelow@gitlab.com> | 2019-06-12 22:36:02 +0300 |
commit | eb719b9fed14665babf2704cf21701571f5c5c6a (patch) | |
tree | b4ba1281b1cfd316501731148c3fd319cd7851ba /app | |
parent | 9bf141cf718ab9ca770c3bd6b7e2c6719cbe9da7 (diff) |
Allow command and control click to work on MR tabs
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index e5cf43e8289..b6868e63716 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -147,14 +147,14 @@ export default class MergeRequestTabs { e.stopImmediatePropagation(); e.preventDefault(); - const { action } = e.currentTarget.dataset; + const { action } = e.currentTarget.dataset || {}; - if (action) { - const href = e.currentTarget.getAttribute('href'); - this.tabShown(action, href); - } else if (isMetaClick(e)) { + if (isMetaClick(e)) { const targetLink = e.currentTarget.getAttribute('href'); window.open(targetLink, '_blank'); + } else if (action) { + const href = e.currentTarget.getAttribute('href'); + this.tabShown(action, href); } } } |