From 0dbe883c3b79b88375ba15b3b8c74c5c72ec684d Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 29 Jun 2018 13:24:31 -0700 Subject: Fix onboarding always starting --- packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 6ef8fced1..52a045573 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -44,8 +44,9 @@ export interface PortalOnboardingFlowProps extends RouteComponentProps { class PlainPortalOnboardingFlow extends React.Component { private _unlisten: () => void; public componentDidMount(): void { - this._autoStartOnboardingIfShould(); this._adjustStepIfShould(); + // Wait until the step is adjusted to decide whether we should show onboarding. + setTimeout(this._autoStartOnboardingIfShould.bind(this), 250); // If there is a route change, just close onboarding. this._unlisten = this.props.history.listen(() => this.props.updateIsRunning(false)); } -- cgit