File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,10 @@ var utilities = require('./utilities');
10
10
module . exports = function attributesToProps ( attributes ) {
11
11
attributes = attributes || { } ;
12
12
13
- var valueOnlyInputs = {
13
+ var valueOnlyTypes = {
14
14
reset : true ,
15
- submit : true
15
+ submit : true ,
16
+ option : true
16
17
} ;
17
18
18
19
var attributeName ;
@@ -21,7 +22,7 @@ module.exports = function attributesToProps(attributes) {
21
22
var propName ;
22
23
var propertyInfo ;
23
24
var props = { } ;
24
- var inputIsValueOnly = attributes . type && valueOnlyInputs [ attributes . type ] ;
25
+ var typeIsValueOnly = attributes . type && valueOnlyTypes [ attributes . type ] ;
25
26
26
27
for ( attributeName in attributes ) {
27
28
attributeValue = attributes [ attributeName ] ;
@@ -43,7 +44,7 @@ module.exports = function attributesToProps(attributes) {
43
44
// https://reactjs.org/docs/uncontrolled-components.html
44
45
if (
45
46
( propName === 'checked' || propName === 'value' ) &&
46
- ! inputIsValueOnly
47
+ ! typeIsValueOnly
47
48
) {
48
49
propName = getPropName ( 'default' + attributeNameLowerCased ) ;
49
50
}
You can’t perform that action at this time.
0 commit comments