Have value setter toString its value before option lookup
This commit is contained in:
parent
c2384c540f
commit
917b862786
2 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,6 @@
|
|||
"browser": "src/BetterSelect.js",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"url": "https://darkwiiplayer.github.io/BetterSelect/"
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@ export class BetterSelect extends HTMLElement {
|
|||
get value() { return this.#value.value }
|
||||
set value(value) {
|
||||
for (const option of this.options) {
|
||||
if (option.value === value) {
|
||||
if (option.value === String(value)) {
|
||||
this.setOption(option)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue