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) {
Notes.prototype.onAddDiffNote = function(e) {
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');
this.toggleDiffNote({
target: $link,
lineType: $link.data('lineType'),
lineType: link.dataset.lineType,
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