Преглед на файлове

fix: 对 id 做进一步校验

YuJing преди 2 седмици
родител
ревизия
6dc76e2eb4
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      features/feature/src/main/ets/components/reagencyComp.ets

+ 2 - 1
features/feature/src/main/ets/components/reagencyComp.ets

@@ -100,7 +100,8 @@ export struct reagencyComp {
 
     let index = this.bubbles.findIndex(item => item.id == id)
     let location = this.bubbles[index]
-    let time = new Date().getTime() - location.id!
+
+    let time = new Date().getTime() - (id ?? 0)
 
     clearTimeout(location.timer)