Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0395753

Browse files
committed
continue from launched url
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parentd4b4dae commit0395753

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎src/actions/onStartup.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff 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-
consttutorialRes=awaitfetch(TUTORIAL_URL)
42-
consttutorial=awaittutorialRes.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
consttutorial: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+
consttutorialRes=awaitfetch(TUTORIAL_URL)
47+
consttutorial=awaittutorialRes.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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp