Skip to content

Commit

Permalink
fix: only use custom state if object
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed Oct 12, 2018
1 parent b383dc1 commit b046113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -11,7 +11,7 @@ module.exports = function form(root) {
.map(function(el){
var n = name(el)
, v = values[n] =
el.state && 'value' in el.state ? el.state.value
typeof el.state == 'object' && 'value' in el.state ? el.state.value
: el.files ? el.files
: el.type == 'checkbox' ? (values[n] || []).concat(el.checked ? el.value : [])
: el.type == 'radio' ? (el.checked ? el.value : values[n])
Expand Down

0 comments on commit b046113

Please sign in to comment.