Skip to content

Fix/state machine #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 1, 2020
Merged
Prev Previous commit
ensure tutorial configured before starting
  • Loading branch information
ShMcK committed Feb 1, 2020
commit 0d31c65da8b701879ed7d7658476a03081e331f8
2 changes: 1 addition & 1 deletion src/channel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Channel implements Channel {
throw new Error('Invalid tutorial to continue')
}
const continueConfig: T.TutorialConfig = tutorialContinue.version.data.config
tutorialConfig(
await tutorialConfig(
{
config: continueConfig,
alreadyConfigured: true,
Expand Down
8 changes: 3 additions & 5 deletions web-app/src/services/state/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ export const createMachine = (options: any) => {
Summary: {
on: {
BACK: 'SelectTutorial',
TUTORIAL_START: {
target: 'LoadTutorialData',
},
TUTORIAL_START: 'LoadTutorialData',
},
},
LoadTutorialData: {
Expand All @@ -125,8 +123,8 @@ export const createMachine = (options: any) => {
},
SetupNewTutorial: {
onEntry: ['configureNewTutorial', 'startNewTutorial'],
after: {
0: '#tutorial',
on: {
TUTORIAL_CONFIGURED: '#tutorial',
},
},
ContinueTutorial: {
Expand Down