Remove array from logic
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
4f4bc8f805
commit
df74d0c814
1 changed files with 3 additions and 3 deletions
|
@ -132,9 +132,9 @@ export function parseUrlPath(urlPath, currentNavPath, defaultSessionId) {
|
||||||
segments.push(roomsSegmentWithRoom(rooms, roomId, currentNavPath));
|
segments.push(roomsSegmentWithRoom(rooms, roomId, currentNavPath));
|
||||||
}
|
}
|
||||||
segments.push(new Segment("room", roomId));
|
segments.push(new Segment("room", roomId));
|
||||||
const partIndex = parts.findIndex(part => part === "open-room");
|
const openRoomPartIndex = parts.findIndex(part => part === "open-room");
|
||||||
const partsAfterRoom = parts.slice(partIndex + 1);
|
const hasOnlyRoomIdAfterPart = openRoomPartIndex >= parts.length - 2;
|
||||||
if (partsAfterRoom.length === 1) {
|
if (hasOnlyRoomIdAfterPart) {
|
||||||
// Copy right-panel segments from previous path only if there are no other parts after open-room
|
// Copy right-panel segments from previous path only if there are no other parts after open-room
|
||||||
// fixes memberlist -> member details closing/opening grid view
|
// fixes memberlist -> member details closing/opening grid view
|
||||||
const previousSegments = currentNavPath.segments;
|
const previousSegments = currentNavPath.segments;
|
||||||
|
|
Reference in a new issue