From 4cf551ed8388651d29840898e1e521540875a73b Mon Sep 17 00:00:00 2001 From: Jan Komarek Date: Mon, 18 Mar 2024 11:38:08 +0100 Subject: [PATCH] fix(suite): prevent graph tooltip from rendering when payload is [] - otherwise it can crash the app (cherry picked from commit f1d16953b4d5e302940585e14518aacdb23b54e1) --- .../suite/graph/TransactionsGraph/GraphTooltipAccount.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx index fe31e6cd899..01e76a9461b 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx @@ -67,7 +67,9 @@ export const GraphTooltipAccount = ({ ...props }: GraphTooltipAccountProps) => { const formatters = useFormatters(); - if (!active || !payload) { + + // Note: payload is [] when discovery is paused. + if (!active || !payload?.length) { return null; }