Remove jQuery `.attr` from the issue author dropdown (#29915)

- Switched from jQuery `.attr` to plain javascript `.getAttribute`
- Tested the issue author dropdown functionality and it works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
pull/29916/head^2
Yarden Shoham 8 months ago committed by GitHub
parent 8bf4173e31
commit 55a8f4510a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      web_src/js/features/repo-issue-list.js

@ -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', {

Loading…
Cancel
Save