mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-02-17 17:50:19 +08:00
Merge pull request #2947 from KeithHello/main
This commit is contained in:
commit
fd413c7b52
@ -1,6 +1,3 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
|
||||
import { trimTopic } from "../utils";
|
||||
|
||||
import Locale, { getLang } from "../locales";
|
||||
|
@ -70,7 +70,7 @@ export function limitNumber(
|
||||
max: number,
|
||||
defaultValue: number,
|
||||
) {
|
||||
if (typeof x !== "number" || isNaN(x)) {
|
||||
if (isNaN(x)) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@ -133,9 +133,7 @@ export const useAppConfig = createPersistStore(
|
||||
.customModels.split(",")
|
||||
.filter((v) => !!v && v.length > 0)
|
||||
.map((m) => ({ name: m, available: true }));
|
||||
|
||||
const models = get().models.concat(customModels);
|
||||
return models;
|
||||
return get().models.concat(customModels);
|
||||
},
|
||||
}),
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user