From 94af8044f11aae0cd128075cd4eabfe04440a4af Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:36:53 -0800 Subject: [PATCH] fix minor flood without a backend error --- src/widgets/flood/component.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/flood/component.jsx b/src/widgets/flood/component.jsx index 4676d798..80ad2b28 100644 --- a/src/widgets/flood/component.jsx +++ b/src/widgets/flood/component.jsx @@ -11,11 +11,11 @@ export default function Component({ service }) { const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents"); - if (torrentError) { - return ; + if (torrentError || !torrentData?.torrents) { + return ; } - if (!torrentData) { + if (!torrentData || !torrentData.torrents) { return (