Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Checks to see if Predictions exists before returning (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jan 14, 2019
1 parent d557ec0 commit 991cbb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/src/wmata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const fetchBusTimetable = async (stop: string): Promise<object> => {
);
const predictionObj = await predictionResponse.json();

if (predictionObj) {
if (predictionObj.Predictions) {
const incidentData = await fetchIncidents(serviceTypeEnum.BUS);

/* Gets a list of all routes that are due to stop at this stop. */
Expand Down

0 comments on commit 991cbb3

Please sign in to comment.