Skip to content
Snippets Groups Projects
Commit e736d57f authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix qb tutorial link inside qb. Resolves #2940

parent 32b3332d
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,7 @@ const mapStateToProps = (state, props) => {
updateUrl: props.updateUrl,
user: state.currentUser,
fromUrl: state.router && state.router.location && state.router.location.query.from,
location: state.router && state.router.location,
card: card(state),
originalCard: originalCard(state),
......@@ -128,6 +129,10 @@ export default class QueryBuilder extends Component {
// ensure that some components are updated after the animation completes (e.g. card visualization)
window.setTimeout(this.forceUpdateDebounced, 300);
}
// HACK: if we switch to the tutorial from within the QB we need to manually re-initialize
if (!this.props.location.query.tutorial && nextProps.location.query.tutorial) {
this.props.initializeQB(nextProps.updateUrl);
}
}
componentWillUnmount() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment