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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user