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.
This commit is contained in:
Kumi 2024-07-30 14:14:21 +02:00
parent b88a998c9a
commit 7b947029c9
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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,