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:
parent
b88a998c9a
commit
7b947029c9
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue