From 9b2d66aee74b3c25ee296c24a65c6eb357c80a7b Mon Sep 17 00:00:00 2001 From: Delucse <46593742+Delucse@users.noreply.github.com> Date: Fri, 25 Sep 2020 13:40:42 +0200 Subject: [PATCH] fix bug in local storage logic --- src/reducers/tutorialReducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/tutorialReducer.js b/src/reducers/tutorialReducer.js index ef5f433..e96a132 100644 --- a/src/reducers/tutorialReducer.js +++ b/src/reducers/tutorialReducer.js @@ -24,7 +24,7 @@ const initialStatus = () => { } } else{ - status.push({id: tutorialsId, tasks: new Array(tutorial.steps.filter(step => step.type === 'task').length).fill({})}); + status.push({id: tutorialsId, tasks: tutorial.steps.filter(step => step.type === 'task').map(task => {return {id: task.id};})}); } return tutorialsId; });