ctucx.git: oeffisearch

[nimlang] fast and simple tripplanner

commit 706854de38a78834b0967cf57f6a26da061a104c
parent 1463652396f9a51fde5a4fdab2ee7c5978d5b2dd
Author: Milan Pässler <me@pbb.lc>
Date: Sat, 8 Feb 2020 00:29:04 +0100

client: fix loading single journey
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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);