Skip to content

Commit 8c3bea9

Browse files
committed
fix: Fixed the problem that the model list could not be obtained normally without the access password
1 parent 98281bb commit 8c3bea9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Setting.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function Setting({ open, hiddenTalkPanel, onClose }: SettingProps) {
185185

186186
const uploadModelList = useCallback(() => {
187187
const { update } = useModelStore.getState()
188-
if (apiKey || password) {
188+
if (apiKey || password || !isProtected) {
189189
fetchModels({ apiKey, apiProxy, password })
190190
.then((models) => {
191191
if (models.length > 0) {
@@ -195,7 +195,7 @@ function Setting({ open, hiddenTalkPanel, onClose }: SettingProps) {
195195
})
196196
.catch(console.error)
197197
}
198-
}, [apiKey, apiProxy, password])
198+
}, [apiKey, apiProxy, password, isProtected])
199199

200200
useEffect(() => {
201201
if (open && !cachedModelList) {

0 commit comments

Comments
 (0)