From cb34315ad2642df9bd3b7cedaab64fb4dd88bdff Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 22 Apr 2015 18:39:34 +0200 Subject: [PATCH] Fix issue with double location results --- wcfsetup/install/files/js/WCF.Location.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Location.js b/wcfsetup/install/files/js/WCF.Location.js index 4fb601dea0..0c80227a9b 100644 --- a/wcfsetup/install/files/js/WCF.Location.js +++ b/wcfsetup/install/files/js/WCF.Location.js @@ -759,8 +759,6 @@ WCF.Location.GoogleMaps.LocationSearch = WCF.Search.Base.extend({ this._clearList(true); } else if ($content.length >= this._triggerLength) { - this._clearList(false); - this._geocoder.geocode({ address: $content }, $.proxy(this._success, this)); @@ -778,6 +776,8 @@ WCF.Location.GoogleMaps.LocationSearch = WCF.Search.Base.extend({ * @param integer status */ _success: function(results, status) { + this._clearList(false); + if (status != google.maps.GeocoderStatus.OK) { return; } -- 2.20.1