File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/react-dom/src/server Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -691,6 +691,7 @@ function pushStartOption(
691
691
let children = null ;
692
692
let value = null ;
693
693
let selected = null ;
694
+ let innerHTML = null ;
694
695
for ( const propKey in props ) {
695
696
if ( hasOwnProperty . call ( props , propKey ) ) {
696
697
const propValue = props [ propKey ] ;
@@ -716,10 +717,8 @@ function pushStartOption(
716
717
}
717
718
break ;
718
719
case 'dangerouslySetInnerHTML ':
719
- invariant (
720
- false ,
721
- '`dangerouslySetInnerHTML` does not work on <option>.' ,
722
- ) ;
720
+ innerHTML = propValue ;
721
+ break ;
723
722
// eslint-disable-next-line-no-fallthrough
724
723
case 'value ':
725
724
value = propValue ;
@@ -760,6 +759,7 @@ function pushStartOption(
760
759
}
761
760
762
761
target . push ( endOfStartTag ) ;
762
+ pushInnerHTML ( target , innerHTML , children ) ;
763
763
return children ;
764
764
}
765
765
You can’t perform that action at this time.
0 commit comments