Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jQuery .attr from the diff page #30021

Merged
merged 4 commits into from
Mar 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update web_src/js/features/repo-diff.js
Co-authored-by: silverwind <[email protected]>
  • Loading branch information
yardenshoham and silverwind committed Mar 23, 2024
commit 7b5aa9ec31cac1feba66f5eb32bd29467dfd7847
5 changes: 2 additions & 3 deletions web_src/js/features/repo-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ function initRepoDiffReviewButton() {
if (!reviewBox) return;

const $reviewBox = $(reviewBox);
const counters = reviewBox.getElementsByClassName('review-comments-counter');
if (!counters.length) return;
const counter = counters[0];
const counter = reviewBox.querySelector('.review-comments-counter');
if (!counters) return;
yardenshoham marked this conversation as resolved.
Show resolved Hide resolved

$(document).on('click', 'button[name="pending_review"]', (e) => {
const $form = $(e.target).closest('form');
Expand Down
Loading