ensure there is a session id in last-session action

This commit is contained in:
Bruno Windels 2021-05-18 14:47:45 +02:00
parent 2c7ea44afd
commit d567664d8b

View file

@ -115,7 +115,7 @@ export function parseUrlPath(urlPath, currentNavPath, defaultSessionId) {
segments.push(new Segment("room", roomId)); segments.push(new Segment("room", roomId));
} else if (type === "last-session") { } else if (type === "last-session") {
let sessionSegment = currentNavPath.get("session"); let sessionSegment = currentNavPath.get("session");
if (!sessionSegment?.value && defaultSessionId) { if (typeof sessionSegment?.value !== "string" && defaultSessionId) {
sessionSegment = new Segment("session", defaultSessionId); sessionSegment = new Segment("session", defaultSessionId);
} }
if (sessionSegment) { if (sessionSegment) {