zaphyra's git: oeffisearch

fast and simple tripplanner

commit dafeb35966b98ecb303f654d44344843cc11d2bd
parent 443c47c80b306b3f9e76135fac29c0b8b52d0954
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Wed, 5 Nov 2025 13:59:05 +0100

searchView: improve DS100 handling
1 file changed, 6 insertions(+), 5 deletions(-)
M
src/searchView.js
|
11
++++++-----
diff --git a/src/searchView.js b/src/searchView.js
@@ -488,12 +488,13 @@ class SearchView extends BaseView {
 			if (value === '') return;
 
 			this.location[name].value = value;
+
+			let   suggestions = [];
+			const ds100Result = getIBNRbyDS100(value.toUpperCase());
 		
-			let   suggestions;
-			const ds100Result = getIBNRbyDS100(value);
-		
-			if (ds100Result !== null) { suggestions = await client.locations(ds100Result, {'results':  1}); }
-			else                      { suggestions = await client.locations(value,       {'results': 10}); }
+			if (ds100Result !== null) suggestions = await client.locations(ds100Result, {'results':  1})
+
+			suggestions = suggestions.concat(await client.locations(value, {'results': 10}));
 
 			this.location[name].suggestionSelected = null;
 			this.location[name].suggestion         = 0;