mirror of
1
Fork 0

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>
(cherry picked from commit 55a8f4510af5ef67e484d45dd3789c29f120d58e)
This commit is contained in:
Yarden Shoham 2024-03-20 01:39:36 +02:00 committed by Earl Warren
parent 7512b9f7d4
commit 5ed8c86aab
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 3 additions and 3 deletions

View File

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