client: fix loading single journey

This commit is contained in:
Milan Pässler 2020-02-08 00:29:04 +01:00
parent 1463652396
commit 706854de38

View file

@ -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);