add ping and fix uptime

This commit is contained in:
LouisLam
2021-07-01 17:00:23 +08:00
parent 9c653c3d05
commit a6b5986dd6
9 changed files with 285 additions and 97 deletions

View File

@@ -48,7 +48,7 @@ export default {
let frames = 12;
let step = Math.floor(diff / frames);
if (! this.isNum || (diff > 0 && step < 1) || (diff < 0 && step > 1) || diff === 0) {
if (isNaN(step) || ! this.isNum || (diff > 0 && step < 1) || (diff < 0 && step > 1) || diff === 0) {
// Lazy to NOT this condition, hahaha.
} else {
for (let i = 1; i < frames; i++) {