From 674afd769c3d20af84ada2935b0feec49e62d7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 9 Mar 2026 18:48:28 +0800 Subject: [PATCH] Replace loose equality (==) with strict equality (===) for ID comparisons Co-Authored-By: Claude Opus 4.6 --- src/components/Discover/Conformance/MoreModal.vue | 2 +- src/components/Discover/Map/Filter/TraceFilter.vue | 2 +- src/components/Discover/Map/SidebarTraces.vue | 2 +- src/views/Compare/MapCompare.vue | 2 +- src/views/Discover/Map/MapPage.vue | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Discover/Conformance/MoreModal.vue b/src/components/Discover/Conformance/MoreModal.vue index 5d87be4..7617523 100644 --- a/src/components/Discover/Conformance/MoreModal.vue +++ b/src/components/Discover/Conformance/MoreModal.vue @@ -291,7 +291,7 @@ function progressWidth(value) { * @param {number} id case id */ async function switchCaseData(id) { - if (id == showTraceId.value) return; + if (id === showTraceId.value) return; infinite404.value = null; maxItems.value = false; startNum.value = 0; diff --git a/src/components/Discover/Map/Filter/TraceFilter.vue b/src/components/Discover/Map/Filter/TraceFilter.vue index bcdd9c5..b8bdc37 100644 --- a/src/components/Discover/Map/Filter/TraceFilter.vue +++ b/src/components/Discover/Map/Filter/TraceFilter.vue @@ -352,7 +352,7 @@ function progressWidth(value) { */ async function switchCaseData(id, count) { // Do nothing if clicking the same id - if (id == showTraceId.value) return; + if (id === showTraceId.value) return; isLoading.value = true; // Always show loading screen infinit404.value = null; infinitMaxItems.value = false; diff --git a/src/components/Discover/Map/SidebarTraces.vue b/src/components/Discover/Map/SidebarTraces.vue index a59a0cc..82412bf 100644 --- a/src/components/Discover/Map/SidebarTraces.vue +++ b/src/components/Discover/Map/SidebarTraces.vue @@ -243,7 +243,7 @@ function progressWidth(value) { */ async function switchCaseData(id, count) { // Do nothing if clicking the same id - if (id == showTraceId.value) return; + if (id === showTraceId.value) return; isLoading.value = true; // Always show loading screen infinit404.value = null; infinitMaxItems.value = false; diff --git a/src/views/Compare/MapCompare.vue b/src/views/Compare/MapCompare.vue index 9648f59..048570e 100644 --- a/src/views/Compare/MapCompare.vue +++ b/src/views/Compare/MapCompare.vue @@ -364,7 +364,7 @@ async function switchDataLayerType(type, option) { * @param {object} e - Object containing the trace id. */ async function switchTraceId(e) { - if (e.id == traceId.value) return; + if (e.id === traceId.value) return; isLoading.value = true; traceId.value = e.id; await allMapDataStore.getTraceDetail(); diff --git a/src/views/Discover/Map/MapPage.vue b/src/views/Discover/Map/MapPage.vue index e60c071..b804149 100644 --- a/src/views/Discover/Map/MapPage.vue +++ b/src/views/Discover/Map/MapPage.vue @@ -360,7 +360,7 @@ async function switchDataLayerType(type, option) { * @param {object} e - Object containing the trace id. */ async function switchTraceId(e) { - if (e.id == traceId.value) return; + if (e.id === traceId.value) return; isLoading.value = true; traceId.value = e.id; await allMapDataStore.getTraceDetail();