Skip to content

Commit

Permalink
Only set target and rel attributes when href != '#'
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Aug 19, 2022
1 parent e0513e3 commit 5131c6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@
ref="list-item"
:class="{ 'list-item--active' : active }"
:href="href"
target="_blank"
rel="noopener noreferrer"
:target="href === '#' ? undefined : '_blank'"
:rel="href === '#' ? undefined : 'noopener noreferrer'"
class="list-item"
:aria-label="linkAriaLabel"
@mouseover="handleMouseover"
Expand Down

0 comments on commit 5131c6b

Please sign in to comment.