@@ -72,28 +72,22 @@ export default function mdxToBlocks(ctx: Helix.UniversalContext) {
7272 continue ;
7373 }
7474
75- const isHorizontalLine = node . name === 'HorizontalLine' ;
76-
77- // These components does not a fallback repeat
78- const isDefaultNode = node . name === 'Fragment' || node . name === 'iframe' ;
79-
8075 // get slots
8176 const slotsAttr = getAttribute ( node , 'slots' ) ;
82- const slotsValue = getAttributeValue ( slotsAttr , '' ) ;
77+ const slotsValue = getAttributeValue ( slotsAttr , null ) ;
8378 // if (!slotsValue) {
8479 // // TODO: throw error for invalid document
8580 // break;
8681 // }
87- const slots = isHorizontalLine
88- ? [ ]
89- : slotsValue
90- . split ( ',' )
82+ const slots = slotsValue
83+ ? slotsValue . split ( ',' )
9184 . map ( ( slot ) => slot . trim ( ) )
92- . filter ( ( slot ) => slot . length > 0 ) ;
85+ . filter ( ( slot ) => slot . length > 0 )
86+ : [ ] ;
9387
9488 // repeat the block N times if repeat="N" is set
9589 const repeatAttr = getAttribute ( node , 'repeat' ) ;
96- const repeat = isDefaultNode ? 0 : parseInt ( getAttributeValue ( repeatAttr , '1' ) , 10 ) ;
90+ const repeat = parseInt ( getAttributeValue ( repeatAttr , '1' ) , 10 ) ;
9791
9892 // get variants as string
9993 const variantAttr = getAttribute ( node , 'variant' ) ;
0 commit comments