diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-14 14:35:57 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-14 14:35:57 +0100 |
commit | e0e153d2d73199a16e7e7dbc1b34cfeabbc26410 (patch) | |
tree | b7e72d211a57e23e61a7e9df410862654b61b053 /app/assets/javascripts/diff.js | |
parent | 09a4030cab281f588a1e8252ec93484e26a1be16 (diff) | |
download | gitlab-ce-e0e153d2d73199a16e7e7dbc1b34cfeabbc26410.tar.gz |
Dont allow diff commenting if MR locked
Diffstat (limited to 'app/assets/javascripts/diff.js')
-rw-r--r-- | app/assets/javascripts/diff.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/diff.js b/app/assets/javascripts/diff.js index 6a008112203..c12dc7bdc2c 100644 --- a/app/assets/javascripts/diff.js +++ b/app/assets/javascripts/diff.js @@ -17,7 +17,8 @@ class Diff { } }); - FilesCommentButton.init($diffFile); + const tab = document.getElementById('diffs'); + if (tab && tab.dataset.isLocked === 'false') FilesCommentButton.init($diffFile); $diffFile.each((index, file) => new gl.ImageFile(file)); |