diff --git a/src/stores/files.ts b/src/stores/files.ts index 009e841..bcde0f3 100644 --- a/src/stores/files.ts +++ b/src/stores/files.ts @@ -217,7 +217,8 @@ export const useFilesStore = defineStore("filesStore", { this.$router.push({ name: "Files" }); } catch (error) { if (error.response?.status === 422) { - const detail = [...error.response.data.detail]; + const raw = error.response.data?.detail; + const detail = Array.isArray(raw) ? [...raw] : []; uploadFailedSecond(detail); } else {