diff --git a/apps/webapp/app/components/primitives/TreeView/reducer.ts b/apps/webapp/app/components/primitives/TreeView/reducer.ts index 4a8180d4c..ace31e826 100644 --- a/apps/webapp/app/components/primitives/TreeView/reducer.ts +++ b/apps/webapp/app/components/primitives/TreeView/reducer.ts @@ -1,3 +1,4 @@ +import assertNever from "assert-never"; import { FlatTree } from "./TreeView"; import { applyVisibility, @@ -389,6 +390,8 @@ export function reducer(state: TreeState, action: Action): TreeState { }, }); } + + return state; } case "SELECT_LAST_VISIBLE_NODE": { const node = lastVisibleNode(action.payload.tree, state.nodes); @@ -402,6 +405,8 @@ export function reducer(state: TreeState, action: Action): TreeState { }, }); } + + return state; } case "SELECT_NEXT_VISIBLE_NODE": { const selected = selectedIdFromState(state.nodes); @@ -429,6 +434,8 @@ export function reducer(state: TreeState, action: Action): TreeState { }, }); } + + return state; } case "SELECT_PREVIOUS_VISIBLE_NODE": { const selected = selectedIdFromState(state.nodes); @@ -504,6 +511,9 @@ export function reducer(state: TreeState, action: Action): TreeState { }); return newState; } + default: { + assertNever(action); + } } throw new Error(`Unhandled action type: ${(action as any).type}`);