Commit 76926818 authored by Michael Vernier's avatar Michael Vernier

Sort of hack fix to getBuses because osutrip returns vehicles and an error

parent f247aaf4
......@@ -207,7 +207,7 @@ OSUTrip.getBuses = function( route )
bustimeresponse = xml2js.parseStringSync( response.content )[ 'bustime-response' ];
if( bustimeresponse.error )
if( bustimeresponse.error && bustimeresponse.vehicle.length == 0 )
{
throw bustimeresponse.error;
}
......@@ -246,4 +246,4 @@ OSUTrip.getBuses = function( route )
{
throw 'API key required';
}
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment