summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diff.js
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-09-20 15:40:29 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-09-20 15:40:29 +0100
commitfea7b9e68255771a308e9d391079d83c58340814 (patch)
tree2ed7fba24914bb808961a95dc33a579510bea2a9 /app/assets/javascripts/diff.js
parentff7b545c8e462b909af92a5bea58de779c3f438b (diff)
downloadgitlab-ce-fea7b9e68255771a308e9d391079d83c58340814.tar.gz
Fix diff commenting on commits
Diffstat (limited to 'app/assets/javascripts/diff.js')
-rw-r--r--app/assets/javascripts/diff.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/diff.js b/app/assets/javascripts/diff.js
index baeec130579..8959365a5c9 100644
--- a/app/assets/javascripts/diff.js
+++ b/app/assets/javascripts/diff.js
@@ -18,7 +18,7 @@ class Diff {
});
const tab = document.getElementById('diffs');
- if (tab && !Object.hasOwnProperty.call(tab.dataset, 'isLocked')) FilesCommentButton.init($diffFile);
+ if (!tab || (tab && !Object.hasOwnProperty.call(tab.dataset, 'isLocked'))) FilesCommentButton.init($diffFile);
$diffFile.each((index, file) => new gl.ImageFile(file));