Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2947 from KeithHello/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa authored Oct 9, 2023
2 parents 3e2c5af + 5933b3d commit fd413c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions app/store/chat.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";

import { trimTopic } from "../utils";

import Locale, { getLang } from "../locales";
Expand Down
6 changes: 2 additions & 4 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function limitNumber(
max: number,
defaultValue: number,
) {
if (typeof x !== "number" || isNaN(x)) {
if (isNaN(x)) {
return defaultValue;
}

Expand Down Expand Up @@ -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);
},
}),
{
Expand Down

0 comments on commit fd413c7

Please sign in to comment.