kopia lustrzana https://github.com/FacilMap/facilmap
Fixing NPE in routing
rodzic
ed2395658c
commit
89b0aaee4a
|
@ -23,9 +23,11 @@ function calculateRouting(points, mode, callback) {
|
|||
return callback(err);
|
||||
|
||||
if(!body || !body.route)
|
||||
return callback("Invalid response from server.");
|
||||
return callback("Invalid response from routing server.");
|
||||
if(body.route.routeError.message)
|
||||
return callback(body.route.routeError.message);
|
||||
if(!body.route.shape || !body.route.shape.shapePoints)
|
||||
return callback("Invalid response from routing server.");
|
||||
|
||||
var ret = {
|
||||
actualPoints : [ ],
|
||||
|
|
Ładowanie…
Reference in New Issue