From a9e974830ea433e1a9b80209faa1232f517920e2 Mon Sep 17 00:00:00 2001 From: Herman Wikner Date: Mon, 30 Oct 2023 15:07:47 +0100 Subject: [PATCH] Update packages/sanity/src/desk/comments/src/context/setup/CommentsSetupProvider.tsx Co-authored-by: Robin Pyon --- .../desk/comments/src/context/setup/CommentsSetupProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sanity/src/desk/comments/src/context/setup/CommentsSetupProvider.tsx b/packages/sanity/src/desk/comments/src/context/setup/CommentsSetupProvider.tsx index 418d1d29c13..76cc96f8856 100644 --- a/packages/sanity/src/desk/comments/src/context/setup/CommentsSetupProvider.tsx +++ b/packages/sanity/src/desk/comments/src/context/setup/CommentsSetupProvider.tsx @@ -29,7 +29,7 @@ export function CommentsSetupProvider(props: CommentsSetupProviderProps) { // The response is an array containing the addon dataset. We only expect // one addon dataset to be returned, so we return the name of the first // addon dataset in the array. - return Array.isArray(res) && res[0].name ? res[0].name : undefined + return res?.[0]?.name }, [dataset, originalClient, projectId]) const handleCreateClient = useCallback(