diff --git a/src/components/Discover/Map/Filter/TraceFilter.vue b/src/components/Discover/Map/Filter/TraceFilter.vue index 5591a7f..473e830 100644 --- a/src/components/Discover/Map/Filter/TraceFilter.vue +++ b/src/components/Discover/Map/Filter/TraceFilter.vue @@ -355,14 +355,19 @@ async function switchCaseData(id, count) { // Do nothing if clicking the same id if (id === showTraceId.value) return; isLoading.value = true; // Always show loading screen - infinit404.value = null; - infinitMaxItems.value = false; - baseInfiniteStart.value = 0; - allMapDataStore.baseTraceId = id; - infiniteData.value = await allMapDataStore.getBaseTraceDetail(); - showTraceId.value = id; // Set after getDetail so the case table finishes loading before switching showTraceId - createCy(); - isLoading.value = false; + try { + infinit404.value = null; + infinitMaxItems.value = false; + baseInfiniteStart.value = 0; + allMapDataStore.baseTraceId = id; + infiniteData.value = await allMapDataStore.getBaseTraceDetail(); + showTraceId.value = id; // Set after getDetail so the case table finishes loading before switching showTraceId + createCy(); + } catch (error) { + console.error("Failed to load data:", error); + } finally { + isLoading.value = false; + } } /**