From c7d38d4202a9843df4001877bc2e82b4a9d34cef Mon Sep 17 00:00:00 2001 From: tomiir Date: Tue, 2 Jul 2024 16:55:46 -0600 Subject: [PATCH] fix: remove error throwing as first render does not have href props ready --- apps/laboratory/src/components/RandomLink.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/laboratory/src/components/RandomLink.tsx b/apps/laboratory/src/components/RandomLink.tsx index b989964cf0..37dbcae0cb 100644 --- a/apps/laboratory/src/components/RandomLink.tsx +++ b/apps/laboratory/src/components/RandomLink.tsx @@ -7,9 +7,6 @@ export function RandomLink({ hrefs, children }: { hrefs: string[]; children: Rea const [href, setHref] = useState() useEffect(() => { const newHref = hrefs[Math.floor(Math.random() * hrefs.length)] - if (!href) { - throw new Error('No hrefs provided') - } setHref(newHref) }, [hrefs])