diff --git a/public/src/js/parsetja.js b/public/src/js/parsetja.js index 5a966d4..9291bb2 100644 --- a/public/src/js/parsetja.js +++ b/public/src/js/parsetja.js @@ -67,13 +67,14 @@ if((name === "start" || name === "start p1") && !inSong){ inSong = true - if(!hasSong){ + if(!hasSong || name === "start" && courses[courseName] && courses[courseName].startName !== "start"){ if(!(courseName in courses)){ courses[courseName] = {} } - for(var name in currentCourse){ - if(name !== "branch"){ - courses[courseName][name] = currentCourse[name] + courses[courseName].startName = name + for(var opt in currentCourse){ + if(opt !== "branch"){ + courses[courseName][opt] = currentCourse[opt] } } courses[courseName].start = lineNum + 1