From: marc tobias Date: Tue, 7 Jul 2020 12:26:53 +0000 (+0200) Subject: new context.bSearchRan because handlebar makes it hard inspecting undefined vs empty X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/commitdiff_plain/3373f462f0d499d1c836c1f95d756191725bf108?ds=sidebyside new context.bSearchRan because handlebar makes it hard inspecting undefined vs empty --- diff --git a/dist/assets/js/nominatim-ui.js b/dist/assets/js/nominatim-ui.js index 87776c4..c3ffd1b 100644 --- a/dist/assets/js/nominatim-ui.js +++ b/dist/assets/js/nominatim-ui.js @@ -599,6 +599,7 @@ function search_page_load() { aPlace = null; } + context.bSearchRan = true; context.aPlace = aPlace; render_template($('main'), 'reversepage-template', context); @@ -666,6 +667,7 @@ function search_page_load() { fetch_from_api('search', api_request_params, function (aResults) { + context.bSearchRan = true; context.aSearchResults = aResults; if (aResults.length >= 10) { @@ -789,7 +791,7 @@ jQuery(document).ready(function () { url_params.forEach(function (value, key) { if (value === '') to_delete.push(key); }); - for (var i=0; i - {{#if sQuery}} + {{#if bSearchRan}}