From 73bde2538795e3d935dfeb22a19b408892934520 Mon Sep 17 00:00:00 2001
From: chenjianxing <jianxing.chen@fit2cloud.com>
Date: Fri, 2 Jul 2021 18:01:28 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E5=9C=BA=E6=99=AF?=
 =?UTF-8?q?=E6=BB=91=E5=8A=A8=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=8E=A7=E5=88=B6?=
 =?UTF-8?q?=E5=8F=B0=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../api/automation/scenario/EditApiScenario.vue    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
index a16a12698..5c9a3c747 100644
--- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
+++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
@@ -1285,12 +1285,14 @@ export default {
     handleScroll() {
       let stepInfo = this.$refs.stepInfo;
       let debugHeader = this.$refs.debugHeader;
-      let originWidth = debugHeader.clientWidth;
-      if (stepInfo.getBoundingClientRect().top <= 178) {
-        this.isTop = true;
-        debugHeader.style.width = originWidth + 'px';
-      } else {
-        this.isTop = false;
+      if (debugHeader) {
+        let originWidth = debugHeader.clientWidth;
+        if (stepInfo.getBoundingClientRect().top <= 178) {
+          this.isTop = true;
+          debugHeader.style.width = originWidth + 'px';
+        } else {
+          this.isTop = false;
+        }
       }
     }
   }
-- 
GitLab