File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -35,24 +35,24 @@ const onStartup = async (
3535 sessionId: vscode.env.sessionId,
3636 }
3737
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-
5038 // continue from tutorial from local storage
5139 const tutorial: TT.Tutorial | null = context.tutorial.get()
5240
5341 // no stored tutorial, must start new tutorial
5442 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+ }
5656 return
5757 }
5858
You can’t perform that action at this time.
0 commit comments