forked from mystiq/hydrogen-web
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(new Segment("room", roomId));
|
||||
const partIndex = parts.findIndex(part => part === "open-room");
|
||||
const partsAfterRoom = parts.slice(partIndex + 1);
|
||||
if (partsAfterRoom.length === 1) {
|
||||
const openRoomPartIndex = parts.findIndex(part => part === "open-room");
|
||||
const hasOnlyRoomIdAfterPart = openRoomPartIndex >= parts.length - 2;
|
||||
if (hasOnlyRoomIdAfterPart) {
|
||||
// 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
|
||||
const previousSegments = currentNavPath.segments;
|
||||
|
|
Loading…
Reference in a new issue