Add explicit return values in store catch blocks to prevent undefined crashes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 21:45:02 +08:00
parent e5b40605ec
commit e155c0114f
3 changed files with 5 additions and 0 deletions

View File

@@ -234,6 +234,7 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
return;
}
apiError(error, "Failed to load the Trace Detail.");
return [];
}
},
/**
@@ -278,6 +279,7 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
return;
}
apiError(error, "Failed to load the Base Trace Detail.");
return [];
}
},
/**

View File

@@ -64,6 +64,7 @@ export const useCompareStore = defineStore("compareStore", {
return response.data.stats;
} catch (error) {
apiError(error, "Failed to load the Compare's States.");
return null;
}
},
/**

View File

@@ -353,6 +353,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
error,
"Failed to Get the detail of a temporary log conformance issue.",
);
return null;
}
},
/**
@@ -393,6 +394,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
error,
"Failed to Get the detail of a temporary log conformance loop.",
);
return null;
}
},
/**