From 05a37a027b07034a373eb09c99dc4b7c05d70f52 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Tue, 23 Jul 2024 16:49:06 -0700 Subject: [PATCH] Fix TagGroup docs example (#6759) --- packages/react-aria-components/docs/TagGroup.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-aria-components/docs/TagGroup.mdx b/packages/react-aria-components/docs/TagGroup.mdx index 9bab430b076..54ae7775aa8 100644 --- a/packages/react-aria-components/docs/TagGroup.mdx +++ b/packages/react-aria-components/docs/TagGroup.mdx @@ -707,9 +707,9 @@ import {ListStateContext} from 'react-aria-components'; function SelectionCount() { /*- begin highlight -*/ - let state = React.useContext(ListStateContext)!; + let state = React.useContext(ListStateContext); /*- end highlight -*/ - let selected = state.selectionManager.selectedKeys.size; + let selected = state?.selectionManager.selectedKeys.size ?? 0; return {selected} tags selected.; }