From 706854de38a78834b0967cf57f6a26da061a104c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Sat, 8 Feb 2020 00:29:04 +0100 Subject: [PATCH] client: fix loading single journey --- client/js/journeyView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);