Skip to content

Commit

Permalink
Emit value of option tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 15, 2021
1 parent 11b0759 commit da5bd42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-dom/src/server/ReactDOMServerFormatConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,15 +729,16 @@ function pushStartOption(
}
}
break;
case 'value':
value = propValue;
break;
case 'dangerouslySetInnerHTML':
invariant(
false,
'`dangerouslySetInnerHTML` does not work on <option>.',
);
// eslint-disable-next-line-no-fallthrough
case 'value':
value = propValue;
// We intentionally fallthrough to also set the attribute on the node.
// eslint-disable-next-line-no-fallthrough
default:
pushAttribute(target, responseState, propKey, propValue);
break;
Expand Down

0 comments on commit da5bd42

Please sign in to comment.