diff --git a/pages/edit/[linkId].tsx b/pages/edit/[linkId].tsx index db14cc1..d1f5950 100644 --- a/pages/edit/[linkId].tsx +++ b/pages/edit/[linkId].tsx @@ -10,11 +10,8 @@ import { useCallback, useMemo } from 'react' const OONIRunHero = dynamic(() => import('components/OONIRunHero')) -const transformIntoArray = (obj: object) => - Object.entries(obj).map(([k, v]) => ({ - key: k, - value: v, - })) +const transformIntoArray = (obj: object | undefined | null) => + obj ? Object.entries(obj).map(([k, v]) => ({ key: k, value: v })) : [] // biome-ignore lint/suspicious/noExplicitAny: const transformNettests = (nettest: any) => ({