From 7b947029c921f8a411470422ce1718ffd66a8b45 Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 30 Jul 2024 14:14:21 +0200 Subject: [PATCH] refactor: optimize task serialization method Switched from using `this.tasks.values()` to `this.tasks.entries()` in the serialize method. This change directly reduces the complexity of the serialization process by eliminating a mapping step, making it more efficient and streamlined. No functional changes to the output. --- kanblendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kanblendar.js b/kanblendar.js index b5728d6..50bde4e 100644 --- a/kanblendar.js +++ b/kanblendar.js @@ -489,8 +489,8 @@ class Kanblendar { } serialize() { - const tasksArray = Array.from(this.tasks.values()).map(task => ({ - id: task.id, + const tasksArray = Array.from(this.tasks.entries()).map(([id, task]) => ({ + id, title: task.title, description: task.description, dueTime: task.dueTime,