This commit is contained in:
Timothy Jaeryang Baek committed 2025-10-01 22:05:42 -05:00
1 parent 9677871ce7
commit af34e414e1
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -508,6 +508,7 @@
const savedModelIds = async () => { const savedModelIds = async () => {
if ( if (
$selectedFolder && $selectedFolder &&
selectedModels.filter((modelId) => modelId !== '').length > 0 &&
JSON.stringify($selectedFolder?.data?.model_ids) !== JSON.stringify(selectedModels) JSON.stringify($selectedFolder?.data?.model_ids) !== JSON.stringify(selectedModels)
) { ) {
const res = await updateFolderById(localStorage.token, $selectedFolder.id, { const res = await updateFolderById(localStorage.token, $selectedFolder.id, {
+5 -1
View File
@@ -39,9 +39,13 @@
}; };
$: if (selectedModels.length > 0 && $models.length > 0) { $: if (selectedModels.length > 0 && $models.length > 0) {
selectedModels = selectedModels.map((model) => const _selectedModels = selectedModels.map((model) =>
$models.map((m) => m.id).includes(model) ? model : '' $models.map((m) => m.id).includes(model) ? model : ''
); );
if (JSON.stringify(_selectedModels) !== JSON.stringify(selectedModels)) {
selectedModels = _selectedModels;
}
} }
</script> </script>