@corpsmap/corpsmap 3.2.102 → 3.2.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dev.js +7 -3
- package/lib/prod.js +7 -3
- package/package.json +1 -1
- package/src/core-plugins/geocoder/bundle.js +2 -2
package/lib/dev.js
CHANGED
|
@@ -109858,7 +109858,7 @@ var config = {
|
|
|
109858
109858
|
};
|
|
109859
109859
|
|
|
109860
109860
|
var name = "@corpsmap/corpsmap";
|
|
109861
|
-
var version$1 = "3.2.
|
|
109861
|
+
var version$1 = "3.2.103";
|
|
109862
109862
|
var description = "CorpsMap as React Components";
|
|
109863
109863
|
var main = "index.js";
|
|
109864
109864
|
var scripts = {
|
|
@@ -143096,8 +143096,12 @@ var bundle$6 = {
|
|
|
143096
143096
|
q = encodeURIComponent(q);
|
|
143097
143097
|
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=").concat(mapboxToken), function (err, response, body) {
|
|
143098
143098
|
if (err) return callback(err);
|
|
143099
|
-
|
|
143100
|
-
|
|
143099
|
+
var results;
|
|
143100
|
+
try {
|
|
143101
|
+
results = JSON.parse(body);
|
|
143102
|
+
} catch (e) {
|
|
143103
|
+
return callback(null, []);
|
|
143104
|
+
}
|
|
143101
143105
|
if (!results.features) return callback(null, []);
|
|
143102
143106
|
return callback(null, results.features.map(function (r) {
|
|
143103
143107
|
var icon = "mdi mdi-map-marker";
|
package/lib/prod.js
CHANGED
|
@@ -109772,7 +109772,7 @@ var config = {
|
|
|
109772
109772
|
};
|
|
109773
109773
|
|
|
109774
109774
|
var name = "@corpsmap/corpsmap";
|
|
109775
|
-
var version$1 = "3.2.
|
|
109775
|
+
var version$1 = "3.2.103";
|
|
109776
109776
|
var description = "CorpsMap as React Components";
|
|
109777
109777
|
var main = "index.js";
|
|
109778
109778
|
var scripts = {
|
|
@@ -143010,8 +143010,12 @@ var bundle$6 = {
|
|
|
143010
143010
|
q = encodeURIComponent(q);
|
|
143011
143011
|
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=").concat(mapboxToken), function (err, response, body) {
|
|
143012
143012
|
if (err) return callback(err);
|
|
143013
|
-
|
|
143014
|
-
|
|
143013
|
+
var results;
|
|
143014
|
+
try {
|
|
143015
|
+
results = JSON.parse(body);
|
|
143016
|
+
} catch (e) {
|
|
143017
|
+
return callback(null, []);
|
|
143018
|
+
}
|
|
143015
143019
|
if (!results.features) return callback(null, []);
|
|
143016
143020
|
return callback(null, results.features.map(function (r) {
|
|
143017
143021
|
var icon = "mdi mdi-map-marker";
|
package/package.json
CHANGED
|
@@ -142,9 +142,9 @@ export default {
|
|
|
142
142
|
}&access_token=${mapboxToken}`,
|
|
143
143
|
(err, response, body) => {
|
|
144
144
|
if (err) return callback(err);
|
|
145
|
-
if (response.status !== 200) return callback(null, []);
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
let results;
|
|
147
|
+
try { results = JSON.parse(body); } catch (e) { return callback(null, []); }
|
|
148
148
|
if (!results.features) return callback(null, []);
|
|
149
149
|
|
|
150
150
|
return callback(
|