File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
packages/core/src/api/nodeConversions Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 55 BlockSchema ,
66 PartialBlock ,
77} from "../../extensions/Blocks/api/blockTypes" ;
8- import { defaultProps } from "../../extensions/Blocks/api/defaultProps" ;
98import {
109 ColorStyle ,
1110 InlineContent ,
@@ -394,18 +393,6 @@ export function nodeToBlock<BSchema extends BlockSchema>(
394393 if ( attr in propSchema ) {
395394 props [ attr ] = value ;
396395 }
397- // Block ids are stored as node attributes the same way props are, so we
398- // need to ensure we don't attempt to read block ids as props.
399-
400- // the second check is for the backgroundColor & textColor props.
401- // Since we want them to be inherited by child blocks, we can't put them on the blockContent node,
402- // and instead have to put them on the blockContainer node.
403- // The blockContainer node is the same for all block types, but some custom blocks might not use backgroundColor & textColor,
404- // so these 2 props are technically unexpected but we shouldn't log a warning.
405- // (this is a bit hacky)
406- else if ( attr !== "id" && ! ( attr in defaultProps ) ) {
407- console . warn ( "Block has an unrecognized attribute: " + attr ) ;
408- }
409396 }
410397
411398 const blockSpec = blockSchema [ blockInfo . contentType . name ] ;
You can’t perform that action at this time.
0 commit comments