From 44fadc51f1369eece35455b11fe3f7d773817f2c Mon Sep 17 00:00:00 2001 From: Steph Date: Wed, 29 Nov 2023 13:16:55 -0500 Subject: [PATCH] check if geocoderVlaues have been set for that queryKey --- .../static/cloudcare/js/formplayer/menus/views/query.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js index 0218b054fbb6..3b890782c9b5 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js @@ -152,8 +152,9 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", function () { $(function () { kissmetrics.track.event("Accessibility Tracking - Geocoder Seen in Case Search"); }); - if (!sessionStorage.geocoderValues) { - sessionStorage.geocoderValues = JSON.stringify({}); + let queryKey = sessionStorage.queryKey; + if (!sessionStorage.geocoderValues || !sessionStorage.geocoderValues.queryKey) { + sessionStorage.geocoderValues = JSON.stringify({ "queryKey": queryKey }); } if ($field.find('.mapboxgl-ctrl-geocoder--input').length === 0) { if (!initialPageData.get("has_geocoder_privs")) {