Skip to content

Commit

Permalink
fix: wait for project (microsoft#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-krasn authored Jul 21, 2020
1 parent f097807 commit fc4cb96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/react/components/pages/predict/predictPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,9 @@ export default class PredictPage extends React.Component<IPredictPageProps, IPre

private async loadProject(projectId: string) {
const project = this.props.recentProjects.find((project) => project.id === projectId);
await this.props.actions.loadProject(project);
this.props.appTitleActions.setTitle(project.name);
if (project) {
await this.props.actions.loadProject(project);
this.props.appTitleActions.setTitle(project.name);
}
}
}

0 comments on commit fc4cb96

Please sign in to comment.