Skip to content

Commit

Permalink
Fix another import
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Dec 5, 2023
1 parent faa563b commit 9e512d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/embed/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import memoize from 'memize';
/**
* WordPress dependencies
*/
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { privateApis as componentsPrivateApis } from '@wordpress/components';
import { renderToString } from '@wordpress/element';
import {
createBlock,
Expand All @@ -23,7 +23,6 @@ import { ASPECT_RATIOS, WP_EMBED_TYPE } from './constants';
import { unlock } from '../lock-unlock';

const { name: DEFAULT_EMBED_BLOCK } = metadata;
const { kebabCase } = unlock( blockEditorPrivateApis );

/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */

Expand Down Expand Up @@ -283,6 +282,7 @@ export const getAttributesFromPreview = memoize(
// If we got a provider name from the API, use it for the slug, otherwise we use the title,
// because not all embed code gives us a provider name.
const { html, provider_name: providerName } = preview;
const { kebabCase } = unlock( componentsPrivateApis );
const providerNameSlug = kebabCase(
( providerName || title ).toLowerCase()
);
Expand Down

0 comments on commit 9e512d6

Please sign in to comment.