Add optional chaining to error.response.status in catch blocks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 07:55:49 +08:00
parent eeea16be38
commit 2a4aa9db00
3 changed files with 6 additions and 6 deletions

View File

@@ -211,7 +211,7 @@ export const useAllMapDataStore = defineStore('allMapDataStore', {
});
return this.allCase;
} catch(error) {
if(error.response.status === 404) {
if(error.response?.status === 404) {
this.infinite404 = 404;
return;
}
@@ -250,7 +250,7 @@ export const useAllMapDataStore = defineStore('allMapDataStore', {
});
return this.allBaseCase;
} catch(error) {
if(error.response.status === 404) {
if(error.response?.status === 404) {
this.infinite404 = 404;
return;
}