Commit 7212c2c8 authored by Dannon Baker's avatar Dannon Baker
Browse files

Positive conditionals and the early return for the isolated exceptional case...

Positive conditionals and the early return for the isolated exceptional case are clearer and easier to follow than the multiple negative conditions

(discussed on call, was mentioned we could dump this part)
parent 7169fc26
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -183,9 +183,10 @@ function onDragOver(evt: MouseEvent) {
function toggleSidebar(toggle: string = "", to: string | null = null) {
    // if an activity's dedicated panel/sideBar is already active
    // but the route is different, don't collapse
    if (!toggle || !to || route.path === to || !isActiveSideBar(toggle)) {
        activityStore.toggleSideBar(toggle);
    if (toggle && to && !(route.path === to) && isActiveSideBar(toggle)) {
        return;
    }
    activityStore.toggleSideBar(toggle);
}

function onActivityClicked(activity: Activity) {