From: Michael J. Rubinsky Date: Tue, 13 Apr 2010 01:43:03 +0000 (-0400) Subject: ensure we have a callback, fix status code return X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e978ac588e0c4796558bdd24941800344c404442;p=horde.git ensure we have a callback, fix status code return --- diff --git a/horde/js/hordemap/google.js b/horde/js/hordemap/google.js index 5892598a3..3d0fde90a 100644 --- a/horde/js/hordemap/google.js +++ b/horde/js/hordemap/google.js @@ -63,7 +63,7 @@ HordeMap.Geocoder.Google = Class.create( _reverseCallback: function(r) { if (r.Status.code != 200) { - this._errorCallback(r.code); + this._errorCallback(r.Status.code); return; } var results = []; @@ -84,6 +84,7 @@ HordeMap.Geocoder.Google = Class.create( reverseGeocode: function(latlon, completeCallback, errorCallback) { this._userCallback = completeCallback; + this._errorCallback = errorCallback || function () {}; this.gc.getLocations(new GLatLng(latlon.lat, latlon.lon), this._reverseCallback.bind(this)); } });