aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-14 05:28:57 +0000
committerGitHub <noreply@github.com>2021-11-14 00:28:57 -0500
commit8eddb755086f84c8c1168447391ac04a3a6b7702 (patch)
treeb5f5fae53aebdf132a4c0c8ee93d2a1a028218f1 /web_src/js
parent424959e07cf197e03297b0277f48785d0864e9a1 (diff)
downloadgitea-8eddb755086f84c8c1168447391ac04a3a6b7702.tar.gz
gitea-8eddb755086f84c8c1168447391ac04a3a6b7702.zip
perf: only generate data-comment-url once (#17618)
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/repo-issue.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index c95b6c1307..782957c5b1 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -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'));