store only xml if tutorial-id exists

This commit is contained in:
Delucse
2020-09-08 15:06:26 +02:00
parent eea893a071
commit 4f34811a94
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ export const tutorialCheck = (status) => (dispatch, getState) => {
};
export const storeTutorialXml = (code) => (dispatch, getState) => {
var tutorialsStatus = getState().tutorial.status;
var id = getState().tutorial.currentId;
if(id){
if(id !== null){
var tutorialsStatus = getState().tutorial.status;
tutorialsStatus[id] = {...tutorialsStatus[id], xml: code};
dispatch({
type: TUTORIAL_XML,