Fix bug for title not showing if the website doesn't have a title (When using Auto link title)

Uses the default fallback title instead.
This commit is contained in:
GnoxNahte 2024-09-26 23:22:20 +08:00
parent a606bab6ee
commit b993ff0469

View file

@ -72,7 +72,7 @@ export class DefaultFallbackEmbed extends EmbedBase {
console.log(response);
if (!response.headers["content-type"].includes("text/html"))
return "";
return this.plugin.settings.fallbackDefaultLink;
const html = response.text;
const doc = new DOMParser().parseFromString(html, 'text/html');