From 1c8ac091842e3779f2dba595e0afc57ef400e6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 10 Mar 2026 00:30:58 +0800 Subject: [PATCH] Compare with undefined directly instead of using typeof (S7741) 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 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Discover/Conformance/MoreModal.vue b/src/components/Discover/Conformance/MoreModal.vue index dbd186d..e3558cc 100644 --- a/src/components/Discover/Conformance/MoreModal.vue +++ b/src/components/Discover/Conformance/MoreModal.vue @@ -254,7 +254,7 @@ watch( watch(showTraceId, (newValue, oldValue) => { const isScrollTop = document.querySelector(".infiniteTable"); - if (isScrollTop && typeof isScrollTop.scrollTop !== "undefined") + if (isScrollTop && isScrollTop.scrollTop !== undefined) if (newValue !== oldValue) isScrollTop.scrollTop = 0; }); diff --git a/src/components/Discover/Map/Filter/TraceFilter.vue b/src/components/Discover/Map/Filter/TraceFilter.vue index e6ddc82..ff6ef47 100644 --- a/src/components/Discover/Map/Filter/TraceFilter.vue +++ b/src/components/Discover/Map/Filter/TraceFilter.vue @@ -271,7 +271,7 @@ watch(infinit404, (newValue) => { watch(showTraceId, (newValue, oldValue) => { const isScrollTop = document.querySelector(".infiniteTable"); - if (isScrollTop && typeof isScrollTop.scrollTop !== "undefined") + if (isScrollTop && isScrollTop.scrollTop !== undefined) if (newValue !== oldValue) isScrollTop.scrollTop = 0; }); diff --git a/src/components/Discover/Map/SidebarTraces.vue b/src/components/Discover/Map/SidebarTraces.vue index 6e16c57..14f0ac5 100644 --- a/src/components/Discover/Map/SidebarTraces.vue +++ b/src/components/Discover/Map/SidebarTraces.vue @@ -209,7 +209,7 @@ watch( watch(showTraceId, (newValue, oldValue) => { const isScrollTop = document.querySelector(".infiniteTable"); - if (isScrollTop && typeof isScrollTop.scrollTop !== "undefined") + if (isScrollTop && isScrollTop.scrollTop !== undefined) if (newValue !== oldValue) isScrollTop.scrollTop = 0; });