fix edge case for getting metadata

This commit is contained in:
yxshv 2024-04-13 20:53:36 +05:30
parent 68ee684a1a
commit 2b926ba610

View file

@ -19,6 +19,8 @@ export async function getMetaData(url: string) {
let favicon = _favicon.trim().length > 0 ? _favicon.trim() : 'https://supermemory.dhr.wtf/web.svg'
if (favicon.startsWith("/")) {
favicon = baseUrl + favicon
} else if (favicon.startsWith("./")) {
favicon = baseUrl + favicon.slice(1)
}
// Prepare the metadata object