Skip to content

Commit

Permalink
Fix updateRoutes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kirosc committed Sep 3, 2020
1 parent 54e62ed commit 8be30bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/get-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ let promise4 = axios
.then(res => {
let routes = convert.xml2json(res.data, { compact: true, spaces: 4, ignoreDeclaration: true, textKey: "text" });
routes = JSON.parse(routes);
routes = routes.ROUTE_BUS.ROUTE;

routes = routes.ROUTE_BUS?.ROUTE ?? routes.dataroot?.ROUTE;

for (const route of routes) {
if (route.COMPANY_CODE.text === 'KMB') {
Expand Down

0 comments on commit 8be30bd

Please sign in to comment.