diff options
author | Kushal Pandya <kushal@gitlab.com> | 2017-02-07 19:46:10 +0300 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2017-02-07 19:46:10 +0300 |
commit | 82a05423e6c246dc465eb7019e310f4f8a96edf9 (patch) | |
tree | 121e10b9c10130973944656866041b0f653fd03d /app | |
parent | 1278b5cea4b05eb434649915a9d575c7ec3c95a2 (diff) |
Simplify conditions
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js.es6 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.es6 b/app/assets/javascripts/merge_request_tabs.js.es6 index 186cb3e9190..af1ba9ecaf3 100644 --- a/app/assets/javascripts/merge_request_tabs.js.es6 +++ b/app/assets/javascripts/merge_request_tabs.js.es6 @@ -102,12 +102,10 @@ require('./flash'); } clickTab(e) { - if (e.target) { + if (e.target && gl.utils.isMetaClick(e)) { const targetLink = e.target.getAttribute('href'); - if (gl.utils.isMetaClick(e)) { - e.stopImmediatePropagation(); - window.open(targetLink, '_blank'); - } + e.stopImmediatePropagation(); + window.open(targetLink, '_blank'); } } |