Skip to content

Commit

Permalink
fixed (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemis-prime authored Mar 5, 2024
1 parent a447187 commit 07d3e44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hanzo/ui",
"version": "1.0.9",
"version": "1.0.10",
"description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/primitives/link-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ const LinkElement: React.FC<PropsWithChildren & {
// As per LinkDef docs
if (href.startsWith('http') || href.startsWith('mailto')) {
linkProps.rel = 'noreferrer noopener'
if (newTab !== undefined || newTab === true) {
if (newTab ?? true) {
linkProps.target = '_blank'
}
}
else if (newTab !== undefined && newTab === true) {
else if (newTab) {
linkProps.target = '_blank'
}

Expand Down

0 comments on commit 07d3e44

Please sign in to comment.