From e978ac588e0c4796558bdd24941800344c404442 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 12 Apr 2010 21:43:03 -0400 Subject: [PATCH] ensure we have a callback, fix status code return --- horde/js/hordemap/google.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); } }); -- 2.11.0