diff --git a/ghost/admin/app/components/koenig-lexical-editor.js b/ghost/admin/app/components/koenig-lexical-editor.js index 88262ea871..861974c19b 100644 --- a/ghost/admin/app/components/koenig-lexical-editor.js +++ b/ghost/admin/app/components/koenig-lexical-editor.js @@ -147,14 +147,11 @@ export default class KoenigLexicalEditor extends Component { } ReactComponent = (props) => { - const fetchEmbed = async (url) => { + const fetchEmbed = async (url, {type}) => { let oembedEndpoint = this.ghostPaths.url.api('oembed'); let response = await this.ajax.request(oembedEndpoint, { - data: {url, type: 'bookmark'} + data: {url, type} }); - if (!response.metadata) { - throw 'No metadata returned'; - } return response; };