summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diff.js
diff options
context:
space:
mode:
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 a12829f8420..47de7a76899 100644
--- a/app/assets/javascripts/diff.js
+++ b/app/assets/javascripts/diff.js
@@ -26,7 +26,7 @@ export default class Diff {
FilesCommentButton.init($diffFile);
const firstFile = $('.files').first().get(0);
- const canCreateNote = firstFile && firstFile.hasAttribute('data-can-create-note');
+ const canCreateNote = firstFile && Object.hasOwn(firstFile.dataset, 'canCreateNote');
$diffFile.each((index, file) => initImageDiffHelper.initImageDiff(file, canCreateNote));
if (!isBound) {