Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 8c688f1

Browse files
authored
Strip double quotes from select values (#40)
Strip double quotes from select values
2 parents ef7e015 + 5adaa3b commit 8c688f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const createSelect = (propName, elements, defaultProps) => {
4545
try {
4646
const options = elements
4747
// Cleanup string quotes, if any.
48-
.map(value => value.value.replace(/^'(.*)'$/, '$1'))
48+
.map(value => value.value.replace(/^['"](.*)['"]$/, '$1'))
4949
.reduce(optionsReducer, {})
5050
return select(propName, withDefaultOption(options), defaultProps[propName])
5151
}

0 commit comments

Comments
 (0)