diff --git a/src/markdown/embed-transformers/Tweet.ts b/src/markdown/embed-transformers/Tweet.ts index 28977066..3108e21d 100644 --- a/src/markdown/embed-transformers/Tweet.ts +++ b/src/markdown/embed-transformers/Tweet.ts @@ -14,6 +14,6 @@ export const TweetTransformer: Transformer = { const { pathname } = url const matched = match<{ id: string }>("/:user/status/:id")(pathname) if (!matched) return - return `` + return `` }, } diff --git a/src/markdown/rehype-embed.ts b/src/markdown/rehype-embed.ts index e525cacd..3bc39d9b 100644 --- a/src/markdown/rehype-embed.ts +++ b/src/markdown/rehype-embed.ts @@ -27,7 +27,11 @@ export const rehypeEmbed: Plugin< const href = node.properties?.href if (typeof href === "string") { - const url = new URL(href) + let url + try { + url = new URL(href) + } catch (error) {} + if (!url) return for (const transformer of transformers) { if (transformer.shouldTransform(url)) { const html = transformer.getHTML(url)?.trim() diff --git a/src/queries/unidata.ts b/src/queries/unidata.ts index 4250f09c..f74960c1 100644 --- a/src/queries/unidata.ts +++ b/src/queries/unidata.ts @@ -15,7 +15,6 @@ export const useUnidata = () => { import("unidata.js").then(({ default: Unidata }) => { if (isConnected && connector) { connector?.getProvider().then((provider) => { - console.log("provider", provider) setUnidata( new Unidata({ ethereumProvider: provider,