From 82e5a80c0dadfe72463f7e9be8f9dc163e41e04d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 17 Sep 2020 14:24:28 +0200 Subject: [PATCH] Remove accidental empty query --- UI/SearchAndGo.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/SearchAndGo.ts b/UI/SearchAndGo.ts index 047ae1e4f..446b6b613 100644 --- a/UI/SearchAndGo.ts +++ b/UI/SearchAndGo.ts @@ -44,11 +44,15 @@ export class SearchAndGo extends UIElement { // Triggered by 'enter' or onclick private RunSearch() { const searchString = this._searchField.GetValue().data; + if(searchString === undefined || searchString === ""){ + return; + } this._searchField.GetValue().setData(""); this._placeholder.setData(Translations.t.general.search.searching); const self = this; Geocoding.Search(searchString, (result) => { + console.log("Search result", result) if (result.length == 0) { self._placeholder.setData(Translations.t.general.search.nothing); return;