Revert change in web

This commit is contained in:
Hongbo Wu 2022-05-11 23:07:13 +08:00
parent b102e35465
commit 37ce895d01

View file

@ -6,10 +6,10 @@ import { PageType } from '../../../lib/networking/fragments/articleFragment'
const siteName = (originalArticleUrl: string, itemUrl: string): string => {
try {
return new URL(originalArticleUrl).hostname.replace(/^www\./, '')
return new URL(originalArticleUrl).hostname
} catch {}
try {
return new URL(itemUrl).hostname.replace(/^www\./, '')
return new URL(itemUrl).hostname
} catch {}
return ''
}