From 0fc060fb05a66fac58f097db759d6a8183b3ec12 Mon Sep 17 00:00:00 2001 From: fynks <75840152+fynks@users.noreply.github.com> Date: Fri, 24 Oct 2025 09:51:29 +0500 Subject: [PATCH] fix: duplicated drop down options in comparison --- dist/js/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dist/js/app.js b/dist/js/app.js index 8ac2acd..ade2aa6 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1110,6 +1110,14 @@ class ComparisonManager { #init() { if (!this.#elements.select1 || !this.#elements.select2) return; + // Clear existing options except the first placeholder option + while (this.#elements.select1.options.length > 1) { + this.#elements.select1.remove(1); + } + while (this.#elements.select2.options.length > 1) { + this.#elements.select2.remove(1); + } + // Populate select dropdowns with service options this.#services.forEach(service => { const option1 = document.createElement('option');