@@ -35,24 +35,24 @@ const onStartup = async (
35
35
sessionId :vscode . env . sessionId ,
36
36
}
37
37
38
- // load tutorial from url
39
- if ( TUTORIAL_URL ) {
40
- try {
41
- const tutorialRes = await fetch ( TUTORIAL_URL )
42
- const tutorial = await tutorialRes . json ( )
43
- send ( { type :'START_TUTORIAL_FROM_URL' , payload :{ tutorial} } )
44
- return
45
- } catch ( e ) {
46
- console . log ( `Failed to load tutorial from url${ TUTORIAL_URL } with error "${ e . message } "` )
47
- }
48
- }
49
-
50
38
// continue from tutorial from local storage
51
39
const tutorial :TT . Tutorial | null = context . tutorial . get ( )
52
40
53
41
// no stored tutorial, must start new tutorial
54
42
if ( ! tutorial || ! tutorial . id ) {
55
- send ( { type :'START_NEW_TUTORIAL' , payload :{ env} } )
43
+ if ( TUTORIAL_URL ) {
44
+ // launch from a url env variable
45
+ try {
46
+ const tutorialRes = await fetch ( TUTORIAL_URL )
47
+ const tutorial = await tutorialRes . json ( )
48
+ send ( { type :'START_TUTORIAL_FROM_URL' , payload :{ tutorial} } )
49
+ } catch ( e ) {
50
+ console . log ( `Failed to load tutorial from url${ TUTORIAL_URL } with error "${ e . message } "` )
51
+ }
52
+ } else {
53
+ // launch from a selected tutorial
54
+ send ( { type :'START_NEW_TUTORIAL' , payload :{ env} } )
55
+ }
56
56
return
57
57
}
58
58