We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d07868b commit f935fdbCopy full SHA for f935fdb
1 file changed
src/utils/autoDiscovery.js
@@ -8,6 +8,9 @@ export default async (url, params = {}, options = {}) => {
8
const html = await getHtml(url, options)
9
const doc = new DOMParser().parseFromString(html, 'text/html')
10
const elm = doc.querySelector('link[type="application/json+oembed"]')
11
+ if (!elm) {
12
+ throw new Error('No oEmbed link found')
13
+ }
14
const href = elm.getAttribute('href')
15
const q = new URL(href)
16
const { origin, pathname, searchParams } = q
0 commit comments