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:
@@ -234,6 +234,7 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
apiError(error, "Failed to load the Trace Detail.");
|
apiError(error, "Failed to load the Trace Detail.");
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -278,6 +279,7 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
apiError(error, "Failed to load the Base Trace Detail.");
|
apiError(error, "Failed to load the Base Trace Detail.");
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export const useCompareStore = defineStore("compareStore", {
|
|||||||
return response.data.stats;
|
return response.data.stats;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
apiError(error, "Failed to load the Compare's States.");
|
apiError(error, "Failed to load the Compare's States.");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
|||||||
error,
|
error,
|
||||||
"Failed to Get the detail of a temporary log conformance issue.",
|
"Failed to Get the detail of a temporary log conformance issue.",
|
||||||
);
|
);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -393,6 +394,7 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
|||||||
error,
|
error,
|
||||||
"Failed to Get the detail of a temporary log conformance loop.",
|
"Failed to Get the detail of a temporary log conformance loop.",
|
||||||
);
|
);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user