Skip to content

Commit 8d1086d

Browse files
authored
fix(sidebar): use RegExp for outgoing link detection
Signed-off-by: Aviv Keller <me@aviv.sh>
1 parent ab61d45 commit 8d1086d

File tree

1 file changed

+1
-1
lines changed
  • packages/ui-components/Containers/Sidebar/SidebarItem

1 file changed

+1
-1
lines changed

packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const SidebarItem: FC<SidebarItemProps> = ({
3636
)}
3737
<span className={styles.label}>{label}</span>
3838

39-
{link.startsWith('http') && <ArrowUpRightIcon className={styles.icon} />}
39+
{/^https?:/.test(link) && <ArrowUpRightIcon className={styles.icon} />}
4040
</BaseActiveLink>
4141
);
4242

0 commit comments

Comments
 (0)