File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -637,19 +637,21 @@ function parseStyle(state, value) {
637637 try {
638638 return styleToJs ( value , { reactCompat : true } )
639639 } catch ( error ) {
640- if ( ! state . ignoreInvalidStyle ) {
641- const cause = /** @type {Error } */ ( error )
642- const message = new VFileMessage ( 'Cannot parse `style` attribute' , {
643- ancestors : state . ancestors ,
644- cause,
645- ruleId : 'style' ,
646- source : 'hast-util-to-jsx-runtime'
647- } )
648- message . file = state . filePath || undefined
649- message . url = docs + '#cannot-parse-style-attribute'
650-
651- throw message
640+ if ( state . ignoreInvalidStyle ) {
641+ return { }
652642 }
643+
644+ const cause = /** @type {Error } */ ( error )
645+ const message = new VFileMessage ( 'Cannot parse `style` attribute' , {
646+ ancestors : state . ancestors ,
647+ cause,
648+ ruleId : 'style' ,
649+ source : 'hast-util-to-jsx-runtime'
650+ } )
651+ message . file = state . filePath || undefined
652+ message . url = docs + '#cannot-parse-style-attribute'
653+
654+ throw message
653655 }
654656}
655657
You can’t perform that action at this time.
0 commit comments