Add null guard before spreading error.response.data.detail in uploadLog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -217,7 +217,8 @@ export const useFilesStore = defineStore("filesStore", {
|
|||||||
this.$router.push({ name: "Files" });
|
this.$router.push({ name: "Files" });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response?.status === 422) {
|
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);
|
uploadFailedSecond(detail);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user