Skip to content

Commit

Permalink
Update packages/sanity/src/desk/comments/src/context/setup/CommentsSe…
Browse files Browse the repository at this point in the history
…tupProvider.tsx

Co-authored-by: Robin Pyon <robinpyon@users.noreply.github.com>
  • Loading branch information
hermanwikner and robinpyon committed Oct 31, 2023
1 parent dc40740 commit a9e9748
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a9e9748

Please sign in to comment.