perf: only generate data-comment-url once (#17618)
This commit is contained in:
parent
424959e07c
commit
8eddb75508
4 changed files with 7 additions and 7 deletions
|
@ -517,7 +517,7 @@ export function initRepoPullRequestReview() {
|
|||
const td = ntr.find(`.add-comment-${side}`);
|
||||
let commentCloud = td.find('.comment-code-cloud');
|
||||
if (commentCloud.length === 0 && !ntr.find('button[name="is_review"]').length) {
|
||||
const data = await $.get($(this).data('new-comment-url'));
|
||||
const data = await $.get($(this).closest('[data-new-comment-url]').data('new-comment-url'));
|
||||
td.html(data);
|
||||
commentCloud = td.find('.comment-code-cloud');
|
||||
assignMenuAttributes(commentCloud.find('.menu'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue