김시환

Update sample.js

...@@ -38,8 +38,8 @@ const fetchAPI = async () => { ...@@ -38,8 +38,8 @@ const fetchAPI = async () => {
38 return fetch(request).then(async res => { 38 return fetch(request).then(async res => {
39 const data = await res.json(); 39 const data = await res.json();
40 if(data.route != undefined){ 40 if(data.route != undefined){
41 - const distance = data.route?.trafast[0].summary.distance; 41 + const distance = data.route.trafast[0].summary.distance;
42 - const duration = data.route?.trafast[0].summary.duration; 42 + const duration = data.route.trafast[0].summary.duration;
43 addrData["hospital_data"][idx].distance = distance; 43 addrData["hospital_data"][idx].distance = distance;
44 addrData["hospital_data"][idx].duration = duration;} 44 addrData["hospital_data"][idx].duration = duration;}
45 }); 45 });
......