From e0e153d2d73199a16e7e7dbc1b34cfeabbc26410 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Thu, 14 Sep 2017 14:35:57 +0100 Subject: Dont allow diff commenting if MR locked --- app/assets/javascripts/diff.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/diff.js') 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)); -- cgit v1.2.1