fix of the main problem

This commit is contained in:
2022-10-26 19:55:14 -03:00
parent e7bf748855
commit 715db3f2d6

View File

@@ -118,13 +118,14 @@ const ClockifyTaskForm = ({timerOn, setTimerOn, signedIn, apiKey, setApiKey, tas
data.forEach((project, index) => {
if (project.clientName !== "" && !project.archived) {
if (!data.clients) {
data.clients = {[project.clientName]: [project]}
} else {
if (!data.clients[project.clientName]) {
data.clients[project.clientName] = []
}
data.clients[project.clientName].push(project)
}
project.archived = true
}
})