🐛 fix undefined bugs
This commit is contained in:
parent
158b20ce72
commit
4ce9df38c1
2 changed files with 4 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ function useContextProviders() {
|
|||
>([]);
|
||||
|
||||
const providerConfig = useSelector(
|
||||
(store: RootStore) => store.state.config.contextProviders
|
||||
(store: RootStore) => store.state.config.contextProviders || []
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ function useModels() {
|
|||
const [defaultModel, setDefaultModel] = useState<LLM>(
|
||||
new FreeTrial({ uniqueId: "None", model: "gpt-3.5-turbo" })
|
||||
);
|
||||
const models = useSelector((store: RootStore) => store.state.config.models);
|
||||
const models = useSelector(
|
||||
(store: RootStore) => store.state.config?.models || []
|
||||
);
|
||||
const defaultTitle = useSelector(
|
||||
(store: RootStore) => store.state.config.modelRoles.default
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue