Skip to content

Commit 5e54ae0

Browse files
committed
1 parent 8fd33c9 commit 5e54ae0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/link.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export function setLink(params: { Link: typeof Link }): void {
2323
{
2424
const { to, href, ...rest } = props as { to?: string; href?: string };
2525

26-
const target = to ?? href;
26+
const target =
27+
(typeof to === "string" ? to : undefined) ??
28+
(typeof href === "string" ? href : undefined);
2729

2830
mailto: {
2931
if (target === undefined || !target.startsWith("mailto:")) {

0 commit comments

Comments
 (0)