Skip to content

Commit

Permalink
Fixing crash caused when pasting formatted text. Was happening becaus…
Browse files Browse the repository at this point in the history
…e raw transforms were being filtered out.
  • Loading branch information
illusaen authored and antonis committed Apr 9, 2021
1 parent 1da13e2 commit 6ede89a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/blocks/src/api/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ export function getBlockTransforms( direction, blockTypeOrName ) {
Array.isArray( transforms.supportedMobileTransforms );
const filteredTransforms = usingMobileTransformations
? filter( transforms[ direction ], ( t ) => {
if ( t.type === 'raw' ) {
return true;
}

if ( ! t.blocks || ! t.blocks.length ) {
return false;
}
Expand Down

0 comments on commit 6ede89a

Please sign in to comment.