mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Refresh the data related to the project json on switch back from editor
This commit is contained in:
parent
39f13b50ec
commit
e49eb3a222
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue