Refresh the data related to the project json on switch back from editor

This commit is contained in:
Paul Kaplan 2018-12-03 15:15:18 -05:00
parent 39f13b50ec
commit e49eb3a222

View file

@ -126,6 +126,11 @@ class Preview extends React.Component {
if (this.props.playerMode !== prevProps.playerMode || this.props.fullScreen !== prevProps.fullScreen) { if (this.props.playerMode !== prevProps.playerMode || this.props.fullScreen !== prevProps.fullScreen) {
this.pushHistory(history.state === null); this.pushHistory(history.state === null);
} }
// Switching out of editor mode, refresh data that comes from project json
if (this.props.playerMode && !prevProps.playerMode) {
this.getProjectData(this.state.projectId);
}
} }
componentWillUnmount () { componentWillUnmount () {
this.removeEventListeners(); this.removeEventListeners();