Skip to content

Commit

Permalink
add await to handler calls in MapContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Falsal committed Aug 31, 2024
1 parent 8545e08 commit 995f41f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Map/TourMapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ function TourMapContainer({
const _tourDetail = await onSelectTour(tourId);
const _tour = _tourDetail.data.tour;
if (_tour) setSelectedTour(_tour);
if (_tour && _tour.gpx_file) handleGpxTrack(_tour.gpx_file);
if (_tour && _tour.totour_gpx_file) handleTotourGpxTrack(_tour.totour_gpx_file);
if (_tour && _tour.fromtour_gpx_file) handleFromtourGpxTrack(_tour.fromtour_gpx_file);
if (_tour && _tour.gpx_file) await handleGpxTrack(_tour.gpx_file);
if (_tour && _tour.totour_gpx_file) await handleTotourGpxTrack(_tour.totour_gpx_file);
if (_tour && _tour.fromtour_gpx_file) await handleFromtourGpxTrack(_tour.fromtour_gpx_file);
} catch (error) {
console.error("Error fetching tour details:", error);
} finally {
Expand Down

0 comments on commit 995f41f

Please sign in to comment.