From 8499177fde370a733e99bb81ba093a5366e2b58d Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 22 Jan 2025 15:46:10 +0100 Subject: [PATCH] Fix error with default selected option --- package.json | 2 +- src/BetterSelect.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b2de09e..a1be36b 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,6 @@ "browser": "src/BetterSelect.js", "type": "module", "license": "MIT", - "version": "1.4.0", + "version": "1.4.1", "url": "https://darkwiiplayer.github.io/BetterSelect/" } diff --git a/src/BetterSelect.js b/src/BetterSelect.js index c0afda6..c3bfa34 100644 --- a/src/BetterSelect.js +++ b/src/BetterSelect.js @@ -377,7 +377,7 @@ export class BetterSelect extends HTMLElement { set value(value) { for (const option of this.options) { if (option.value === String(value)) { - this.setOption(option) + this.setValue(option.value, option.innerText) return } }