From ef6a76c1185b6447f65418207c44f222377c304e Mon Sep 17 00:00:00 2001 From: Chris Short <13677134+devcshort@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:09:33 -0800 Subject: [PATCH] Add null checks on phone numbers --- packages/client/pages/favorites/[id].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/pages/favorites/[id].tsx b/packages/client/pages/favorites/[id].tsx index d1342cb6..eeccec7b 100644 --- a/packages/client/pages/favorites/[id].tsx +++ b/packages/client/pages/favorites/[id].tsx @@ -76,7 +76,7 @@ export default function FavoritesDetail({ favoriteList, viewingAsOwner }: any) { description: el?.translations?.[0]?.serviceDescription, location: el.location, website: el.website, - phone: el.phoneNumbers.find( + phone: el?.phoneNumbers?.find( (el: any) => el.rank === 1 && el.type === 'voice' ), }))}