Skip to content

Commit e79d983

Browse files
committed
fix: empty url error
1 parent fe8482b commit e79d983

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/runtime/utils/url.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ export const getUtmParams = (url: string) => {
1717
}
1818

1919
export const isExternalUrl = (url: string, hostname: string) => {
20-
// Relative url
20+
// Empty URL
21+
if (!url) {
22+
return false
23+
}
24+
25+
// Relative URL
2126
if (url.startsWith('/')) {
2227
return false
2328
}

0 commit comments

Comments
 (0)