Skip to content

Commit

Permalink
Improve JavaScript querySelector syntax #1286
Browse files Browse the repository at this point in the history
Reference: #1286

Signed-off-by: John M. Horan <[email protected]>
  • Loading branch information
johnmhoran committed Aug 31, 2023
1 parent c08097a commit 57479fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vulnerabilities/templates/vulnerability_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@
activeLink.classList.remove('is-active');
activeTabContent.classList.remove('is-active');

const target_id = document.querySelector("[data-tab='" + tabName + "']");
const targetTabContent = document.querySelector("[data-content='" + tabName + "']");
const target_id = document.querySelector(`[data-tab='${tabName}']`);
const targetTabContent = document.querySelector(`[data-content='${tabName}']`);

target_id.classList.add('is-active');
targetTabContent.classList.add('is-active');
Expand Down

0 comments on commit 57479fe

Please sign in to comment.