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:
2026-03-09 17:10:13 +08:00
parent 91c6f5e54c
commit b3e5554133

View File

@@ -368,9 +368,9 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
try {
const response = await apiClient.get(api);
this.temporaryData = response.data.rules;
this.logId = response.data.log.id;
this.logId = response.data.log?.id;
this.filterName = response.data.name;
this.baseLogId = response.data.log.id;
this.baseLogId = response.data.log?.id;
} catch (error) {
apiError(error, "Failed to get Filter Detail.");
}