From 6ede89a1152a65988791c4cf9ca9cea914dbc227 Mon Sep 17 00:00:00 2001 From: Wendy Chen Date: Fri, 9 Apr 2021 10:06:06 -0500 Subject: [PATCH] Fixing crash caused when pasting formatted text. Was happening because raw transforms were being filtered out. --- packages/blocks/src/api/factory.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/blocks/src/api/factory.js b/packages/blocks/src/api/factory.js index 5831cfff3e86ef..f01edef37f4f48 100644 --- a/packages/blocks/src/api/factory.js +++ b/packages/blocks/src/api/factory.js @@ -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; }