Add optional chaining for response.data.log.id access in getFilterDetail
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -368,9 +368,9 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
|
|||||||
try {
|
try {
|
||||||
const response = await apiClient.get(api);
|
const response = await apiClient.get(api);
|
||||||
this.temporaryData = response.data.rules;
|
this.temporaryData = response.data.rules;
|
||||||
this.logId = response.data.log.id;
|
this.logId = response.data.log?.id;
|
||||||
this.filterName = response.data.name;
|
this.filterName = response.data.name;
|
||||||
this.baseLogId = response.data.log.id;
|
this.baseLogId = response.data.log?.id;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
apiError(error, "Failed to get Filter Detail.");
|
apiError(error, "Failed to get Filter Detail.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user