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 = () => {