fix: models not loading
Co-Authored-By: _00_ <131402327+rgaricano@users.noreply.github.com>
This commit is contained in:
@@ -234,7 +234,7 @@ export const getOllamaModels = async (token: string = '', urlIdx: null | number
|
||||
return (res?.models ?? [])
|
||||
.map((model) => ({ id: model.model, name: model.name ?? model.model, ...model }))
|
||||
.sort((a, b) => {
|
||||
return a.name.localeCompare(b.name);
|
||||
return (a?.name ?? a?.id ?? '').localeCompare(b?.name ?? b?.id ?? '');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user