From cb8900b20aeb3831f6cce98358a0f89f8076c0df Mon Sep 17 00:00:00 2001 From: OrbanGergo Date: Sat, 1 Aug 2026 16:56:58 +0300 Subject: [PATCH] fix: address remaining cubic review feedback - clearing search bar --- public/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 7f407a3..3b3a774 100644 --- a/public/script.js +++ b/public/script.js @@ -101,7 +101,7 @@ const showSupportedSources = (targetExtension) => { supportedSourcesEl.textContent = `Supported source types: ${unique.join(", ")}`; }) .catch((err) => { - if (latestSourcesRequestTarget !== targetExtension) return; + if(latestSourcesRequestTarget !== targetExtension) return; console.error(err); supportedSourcesEl.textContent = ""; }); @@ -168,6 +168,8 @@ const updateSearchBar = () => { // when the user clears the search bar using the 'x' button convertButton.disabled = true; formatSelected = false; + latestSourcesRequestTarget = null; + supportedSourcesEl.textContent = ""; }); convertToInput.addEventListener("blur", (e) => {