From: Matthias Schmidt Date: Wed, 22 Apr 2015 16:39:34 +0000 (+0200) Subject: Fix issue with double location results X-Git-Tag: 2.1.4~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb34315ad2642df9bd3b7cedaab64fb4dd88bdff;p=GitHub%2FWoltLab%2FWCF.git Fix issue with double location results --- 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; }