From 7286c4bbef4fdb89b5195b684a368afde0d1ea9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 16 Feb 2025 20:24:13 +0100 Subject: [PATCH] Fixed bug in autoselect_typed plugin --- assets/tomselect/autoselect_typed/autoselect_typed.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/tomselect/autoselect_typed/autoselect_typed.js b/assets/tomselect/autoselect_typed/autoselect_typed.js index 3019d4c8..8a426be7 100644 --- a/assets/tomselect/autoselect_typed/autoselect_typed.js +++ b/assets/tomselect/autoselect_typed/autoselect_typed.js @@ -24,6 +24,11 @@ function select_current_input(self){ } const val = self.inputValue() + //Do nothing if the input is empty + if (!val) { + return + } + if (self.options[val]) { self.addItem(val) self.setTextboxValue()