Skip to content

Commit

Permalink
Remove jQuery .attr from the issue author dropdown (#29915)
Browse files Browse the repository at this point in the history
- Switched from jQuery `.attr` to plain javascript `.getAttribute`
- Tested the issue author dropdown functionality and it works as before

Signed-off-by: Yarden Shoham <[email protected]>
  • Loading branch information
yardenshoham authored Mar 19, 2024
1 parent 8bf4173 commit 55a8f45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web_src/js/features/repo-issue-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ function initRepoIssueListAuthorDropdown() {
const $searchDropdown = $('.user-remote-search');
if (!$searchDropdown.length) return;

let searchUrl = $searchDropdown.attr('data-search-url');
const actionJumpUrl = $searchDropdown.attr('data-action-jump-url');
const selectedUserId = $searchDropdown.attr('data-selected-user-id');
let searchUrl = $searchDropdown[0].getAttribute('data-search-url');
const actionJumpUrl = $searchDropdown[0].getAttribute('data-action-jump-url');
const selectedUserId = $searchDropdown[0].getAttribute('data-selected-user-id');
if (!searchUrl.includes('?')) searchUrl += '?';

$searchDropdown.dropdown('setting', {
Expand Down

0 comments on commit 55a8f45

Please sign in to comment.