another way to initialize an array to fix bug

This commit is contained in:
Delucse 2020-09-20 16:45:24 +02:00
parent 420477e02c
commit 0029f7cc26

View File

@ -243,10 +243,11 @@ export const resetTutorial = () => (dispatch, getState) => {
export const readJSON = (json) => (dispatch, getState) => {
dispatch(resetTutorial());
console.log(json.steps.map(() => {return {};}));
dispatch({
type: BUILDER_ERROR,
payload: {
steps: new Array(json.steps.length).fill({})
steps: json.steps.map(() => {return {};})
}
});
dispatch(tutorialTitle(json.title));