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 ++; }