Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Aug 17, 2020
1 parent a3865e4 commit b3eb47e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/embed/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export const createUpgradedEmbedBlock = (
// WordPress blocks can work on multiple sites, and so don't have patterns,
// so if we're in a WordPress block, assume the user has chosen it for a WordPress URL.
const isCurrentBlockWP =
( WP_VARIATION &&
providerNameSlug === WP_VARIATION.attributes.providerNameSlug ) ||
type === WP_EMBED_TYPE;
WP_VARIATION && // Is the WordPress variation of the embed block registered?
( providerNameSlug === WP_VARIATION.attributes.providerNameSlug ||
type === WP_EMBED_TYPE );
// if current block is not WordPress and a more suitable block found
// that is different from the current one, create the new matched block
const shouldCreateNewBlock =
Expand Down

0 comments on commit b3eb47e

Please sign in to comment.