Fix wrong deduplication condition

This commit is contained in:
Dan Abramov
2017-12-10 13:09:10 +00:00
parent 51e3f498a2
commit abe0faf3a1
+2 -2
View File
@@ -38,9 +38,9 @@ function flattenChildren(children) {
export function validateProps(element: Element, props: Object) {
// TODO (yungsters): Remove support for `selected` in <option>.
if (__DEV__) {
if (!didWarnSelectedSetOnOption) {
if (props.selected != null && !didWarnSelectedSetOnOption) {
warning(
props.selected == null,
false,
'Use the `defaultValue` or `value` props on <select> instead of ' +
'setting `selected` on <option>.',
);