From 659f2ebb1178e5cbcca71339553db40c452eae48 Mon Sep 17 00:00:00 2001 From: filesite Date: Fri, 12 Apr 2024 23:53:53 +0800 Subject: [PATCH] bug fix: task status update failed after data saved --- heroUnion.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heroUnion.mjs b/heroUnion.mjs index 04e8123..7ff3a06 100644 --- a/heroUnion.mjs +++ b/heroUnion.mjs @@ -341,7 +341,7 @@ class HeroUnion { //更新任务notified状态以及notify_time通知次数 let taskIndex = this.tasks.findIndex((item) => item.id == task.id); - if (taskIndex) { + if (taskIndex > -1) { this.tasks[taskIndex].notified = notified; this.tasks[taskIndex].notify_time ++; }