From 9549dfbb63295ebd7b01efc6cd5c9a118d9f84b8 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:52:58 -0800 Subject: [PATCH] Allow all TreeComponentState properties to be optional None of these properties are guaranteed to be set on existing usages of setState. --- src/components/tree/tree.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx index 2ed13a603..b1e9f52ca 100644 --- a/src/components/tree/tree.tsx +++ b/src/components/tree/tree.tsx @@ -68,12 +68,12 @@ export interface TreeComponentStateProps { } export interface TreeComponentState { - hoveredNode: { + hoveredNode?: { node: PhyloNode isBranch: boolean } | null - tree: PhyloTreeType | null - treeToo: PhyloTreeType | null + tree?: PhyloTreeType | null + treeToo?: PhyloTreeType | null geneSortFn?: (a: number, b: number) => number | (() => 0) }