Merge pull request #2379 from paulkaplan/refresh-project-data

Refresh the data related to the project json on switch back from editor
This commit is contained in:
Paul Kaplan 2018-12-04 08:34:45 -05:00 committed by GitHub
commit 4a57d36112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,6 +126,11 @@ class Preview extends React.Component {
if (this.props.playerMode !== prevProps.playerMode || this.props.fullScreen !== prevProps.fullScreen) {
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 () {
this.removeEventListeners();