From 6dff9d318a1810ae63558d6fdc67e2a64d4647c9 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Mon, 20 Sep 2021 10:28:56 +0800 Subject: [PATCH] optimize --- src/views/Uptime.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Uptime.vue b/src/views/Uptime.vue index 6956b57e..dd75c670 100644 --- a/src/views/Uptime.vue +++ b/src/views/Uptime.vue @@ -23,12 +23,13 @@
 
@@ -131,7 +132,7 @@ export default { const block = this.blocks.find(b => b[1] === res.block.last_commit.height) if (typeof block === 'undefined') { // mei // this.$set(block, 0, typeof sigs !== 'undefined') - if (this.blocks.length > 50) this.blocks.shift() + if (this.blocks.length >= 50) this.blocks.shift() this.blocks.push({ sigs, height: res.block.last_commit.height }) } })