diff --git a/stores/library.js b/stores/library.js index b16ac8b0e30fbf649075cc5a6fd7b7994235ad4d..8d99b20a538c76ebf5f384ac4efb94cf3e84270c 100644 --- a/stores/library.js +++ b/stores/library.js @@ -32,7 +32,7 @@ export const useLibraryStore = defineStore('library', () => { async function $getCollection () { const { data } = await useRequest('/v1/collection/list') - $collection.value = data.value.data + $collection.value = data && data.value && data.value.data || [] } return { $selectThreadId,