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 .text() #30506

Merged
merged 23 commits into from
Jun 10, 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
refactor pull update button
silverwind committed Jun 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 70eb298ec91f231579848852ea55876e77664eca
5 changes: 3 additions & 2 deletions web_src/js/features/repo-issue.js
Original file line number Diff line number Diff line change
@@ -278,11 +278,12 @@ export function initRepoPullRequestUpdate() {

$('.update-button > .dropdown').dropdown({
onChange(_text, _value, $choice) {
const url = $choice[0].getAttribute('data-do');
const choiceEl = $choice[0];
const url = choiceEl.getAttribute('data-do');
if (url) {
const buttonText = pullUpdateButton.querySelector('.button-text');
if (buttonText) {
buttonText.textContent = $choice[0].textContent ?? '';
buttonText.textContent = choiceEl.textContent ?? '';
silverwind marked this conversation as resolved.
Show resolved Hide resolved
}
pullUpdateButton.setAttribute('data-do', url);
}