From 423ed88fbdd25e59bcd191d079f2b9449f349df2 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 9 Aug 2022 20:10:51 -0700 Subject: [PATCH] Allow a fallback for storybook building --- web/components/modals/NameChangeModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/modals/NameChangeModal.tsx b/web/components/modals/NameChangeModal.tsx index 3942124b9..060ac05b6 100644 --- a/web/components/modals/NameChangeModal.tsx +++ b/web/components/modals/NameChangeModal.tsx @@ -28,7 +28,7 @@ function UserColor(props: { color: number }): React.ReactElement { export default function NameChangeModal(props: Props) { const websocketService = useRecoilValue(websocketServiceAtom); const chatDisplayName = useRecoilValue(chatDisplayNameAtom); - const chatDisplayColor = useRecoilValue(chatDisplayColorAtom); + const chatDisplayColor = useRecoilValue(chatDisplayColorAtom) || 0; const [newName, setNewName] = useState(chatDisplayName); const handleNameChange = () => {