Browse Source

Fix inserting excerpt on compare diff (#11833)

* Fix inserting excerpt on compare diff

* use currentTarget

* remove comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
tags/v1.13.0-rc1
Cirno the Strongest GitHub 5 years ago
parent
commit
a8c2935a17
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      web_src/js/index.js

+ 1
- 1
web_src/js/index.js View File

@@ -2034,7 +2034,7 @@ function initCodeView() {
box.dataset.folded = String(folded); box.dataset.folded = String(folded);
}); });
function insertBlobExcerpt(e) { function insertBlobExcerpt(e) {
const $blob = $(e.target);
const $blob = $(e.currentTarget);
const $row = $blob.parent().parent(); const $row = $blob.parent().parent();
$.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => { $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {
$row.replaceWith(blob); $row.replaceWith(blob);


Loading…
Cancel
Save