Skip to content

Commit

Permalink
refactor: lazy call to get accessible value
Browse files Browse the repository at this point in the history
Co-authored-by: Wayne Van Son <waynevanson@gmail.com>
  • Loading branch information
idanen and waynevanson authored Sep 21, 2022
1 parent ed48108 commit ee8c49c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ function getSingleElementValue(element) {
case 'select':
return getSelectValue(element)
default: {
const accessibleValue = getAccessibleValue(element)
return element.value ?? accessibleValue
return element.value ?? getAccessibleValue(element)
}
}
}
Expand Down

0 comments on commit ee8c49c

Please sign in to comment.