@samitouri / QOS-React / commits / abe0faf3a1

Fix wrong deduplication condition

Dan Abramov committed Dec 10, 2017 at 13:09 UTC abe0faf3a18ea5f3765f2e0390e4cf0b3f25fc80
1 file changed +2 -2
packages/react-dom/src/client/ReactDOMFiberOption.js
+2 -2
@@ -38,9 +38,9 @@ function flattenChildren(children) {
38 export function validateProps(element: Element, props: Object) {
39 // TODO (yungsters): Remove support for `selected` in <option>.
40 if (__DEV__) {
41 - if (!didWarnSelectedSetOnOption) {
41 + if (props.selected != null && !didWarnSelectedSetOnOption) {
42 warning(
43 - props.selected == null,
43 + false,
44 'Use the `defaultValue` or `value` props on <select> instead of ' +
45 'setting `selected` on <option>.',
46 );