Guard baseResponse.data access when baseLogId is falsy in getAllTrace
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
833427b224
commit
c7aa32ef6d
2 files changed
+18
-2
No files matched your search
@@ -165,8 +165,10 @@ export default defineStore('allMapDataStore', {
|
||||
let baseResponse;
|
||||
const response = await this.$axios.get(api);
|
||||
this.allTrace = response.data;
|
||||
if(baseLogId) baseResponse = await this.$axios.get(baseApi);
|
||||
this.allBaseTrace = baseResponse.data;
|
||||
if(baseLogId) {
|
||||
baseResponse = await this.$axios.get(baseApi);
|
||||
this.allBaseTrace = baseResponse.data;
|
||||
}
|
||||
} catch(error) {
|
||||
apiError(error, 'Failed to load the Trace.');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user