Fix error with default selected option
This commit is contained in:
parent
5490237d88
commit
8499177fde
2 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,6 @@
|
||||||
"browser": "src/BetterSelect.js",
|
"browser": "src/BetterSelect.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"url": "https://darkwiiplayer.github.io/BetterSelect/"
|
"url": "https://darkwiiplayer.github.io/BetterSelect/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,7 +377,7 @@ export class BetterSelect extends HTMLElement {
|
||||||
set value(value) {
|
set value(value) {
|
||||||
for (const option of this.options) {
|
for (const option of this.options) {
|
||||||
if (option.value === String(value)) {
|
if (option.value === String(value)) {
|
||||||
this.setOption(option)
|
this.setValue(option.value, option.innerText)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue