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() {
|
serialize() {
|
||||||
const tasksArray = Array.from(this.tasks.values()).map(task => ({
|
const tasksArray = Array.from(this.tasks.entries()).map(([id, task]) => ({
|
||||||
id: task.id,
|
id,
|
||||||
title: task.title,
|
title: task.title,
|
||||||
description: task.description,
|
description: task.description,
|
||||||
dueTime: task.dueTime,
|
dueTime: task.dueTime,
|
||||||
|
|
Loading…
Reference in a new issue