Skip to content

Commit 3e0a63f

Browse files
committed
Fix build
1 parent 14cf3b9 commit 3e0a63f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/communities.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { parse as parseUrl } from 'url';
2-
31
export interface SocialLink {
42
url: string;
53
name?: string;
@@ -47,7 +45,7 @@ const knownSocialHosts: Record<string, SocialDisplayData> = {
4745
}
4846

4947
export function getSocialDisplayData(socialLink: SocialLink): SocialDisplayData {
50-
const hostname = parseUrl(socialLink.url).hostname.replace('www.', '')
48+
const hostname = new URL(socialLink.url).hostname.replace('www.', '')
5149

5250
const defaultResult = knownSocialHosts[hostname] || { icon: "fas fa-link", tooltip: "Web site" }
5351

0 commit comments

Comments
 (0)