diff --git a/client/js/journeyView.js b/client/js/journeyView.js index 459b13a..b79674e 100644 --- a/client/js/journeyView.js +++ b/client/js/journeyView.js @@ -189,9 +189,9 @@ export const journeyView = async (match) => { const journeyId = match[1]; let data; - let { journeys } = getCache('journeys', reqId) - if (journeyId in journeys[journeyId]) { - data = journeys[journeyId]; + let all = getCache('journeys', reqId) + if (all && all.journeys && journeyId in all.journeys) { + data = all.journeys[journeyId]; } else { const request = await get("/journeys", {"reqId": reqId}); addCache('journeys', request);