Commit 5563bf9c authored by Eric Eastwood's avatar Eric Eastwood

Fix jQuery data attribute caching issue casuing expanding issues

Command | Result
$link.data('lineType') | ''
$link.data('line-type') | ''
$link.attr('data-line-type') | 'new'
$link[0].dataset.lineType | 'new'
parent 3c45906b
...@@ -858,11 +858,12 @@ const normalizeNewlines = function(str) { ...@@ -858,11 +858,12 @@ const normalizeNewlines = function(str) {
Notes.prototype.onAddDiffNote = function(e) { Notes.prototype.onAddDiffNote = function(e) {
e.preventDefault(); e.preventDefault();
const $link = $(e.currentTarget || e.target); const link = e.currentTarget || e.target;
const $link = $(link);
const showReplyInput = !$link.hasClass('js-diff-comment-avatar'); const showReplyInput = !$link.hasClass('js-diff-comment-avatar');
this.toggleDiffNote({ this.toggleDiffNote({
target: $link, target: $link,
lineType: $link.data('lineType'), lineType: link.dataset.lineType,
showReplyInput showReplyInput
}); });
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment