mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	perf: only generate data-comment-url once (#17618)
This commit is contained in:
		@@ -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'));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user