From 92c6ce77c332f8ebbcdb090e0ca8b85c85328762 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 1 Jan 2023 13:12:31 +0100 Subject: js: Don't append a trailing space to query. --- assets/js/mumi.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'assets') diff --git a/assets/js/mumi.js b/assets/js/mumi.js index a44a386..9936f34 100644 --- a/assets/js/mumi.js +++ b/assets/js/mumi.js @@ -118,9 +118,7 @@ var mumi = (function () { const form = document.querySelector ("form#search"); form.addEventListener ("submit", function (event) { event.preventDefault (); - for (token of tokenInput.getTokens ()) { - inputElement.value += token.text + " "; - } + inputElement.value = tokenInput.getTokens().map(t => t.text).join(' '); inputElement.style.visibility = 'hidden'; form.submit (); }); -- cgit v1.2.3