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 5
5
BlockSchema ,
6
6
PartialBlock ,
7
7
} from "../../extensions/Blocks/api/blockTypes" ;
8
- import { defaultProps } from "../../extensions/Blocks/api/defaultProps" ;
9
8
import {
10
9
ColorStyle ,
11
10
InlineContent ,
@@ -394,18 +393,6 @@ export function nodeToBlock<BSchema extends BlockSchema>(
394
393
if ( attr in propSchema ) {
395
394
props [ attr ] = value ;
396
395
}
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
- }
409
396
}
410
397
411
398
const blockSpec = blockSchema [ blockInfo . contentType . name ] ;
You can’t perform that action at this time.
0 commit comments