Skip to content

Commit d290ac4

Browse files
committed
fix reading chatversion of null
1 parent 03f921b commit d290ac4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/components/NavBar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ const NavItems = ({ user, t, languages, handleLanguageChange, language }) => {
9797
const [openLanguageSelect, setOpenLanguageSelect] = useState(false)
9898
return (
9999
<>
100-
{user.preferences.chatVersion !== 2 && (
100+
{user?.preferences?.chatVersion !== 2 && (
101101
<Link to="/v2" style={{ textDecoration: 'none' }}>
102102
<Button>
103103
<GradeOutlined sx={styles.icon} /> {t('tryNew')}
104104
</Button>
105105
</Link>
106106
)}
107-
{user.preferences.chatVersion !== 1 && (
107+
{user?.preferences?.chatVersion !== 1 && (
108108
<Link to="/v1" style={{ textDecoration: 'none' }}>
109109
<Button>
110110
<GradeOutlined sx={styles.icon} /> {t('useOld')}

0 commit comments

Comments
 (0)