Browse Source

fix(remote-log): no data

daigang 2 năm trước cách đây
mục cha
commit
0d19a0e72a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/views/platform/remote-log/index.vue

+ 1 - 1
src/views/platform/remote-log/index.vue

@@ -219,7 +219,7 @@ export default {
     getheartbeatData (params) {
       if (this.sn) {
         return getHeartbeats(params, this.sn).then(({ data }) => {
-          if (data[0].timestamp !== this.$heartbeats[0]?.timestamp) {
+          if (data.length && data[0].timestamp !== this.$heartbeats[0]?.timestamp) {
             this.$heartbeats.unshift(data[0])
           }
           return { data: this.$heartbeats }