Unverified Commit 8653e358 authored by Benjamin Wheeler's avatar Benjamin Wheeler Committed by GitHub

Merge pull request #2232 from benjiwheeler/dont-get-extensions

moved getExtensions out of constructor, and out of projectInfo response
parents e563254c dd07e46c
......@@ -80,7 +80,6 @@ class Preview extends React.Component {
addToStudioOpen: false,
reportOpen: false
};
this.getExtensions(this.state.projectId);
this.addEventListeners();
/* In the beginning, if user is on mobile and landscape, go to fullscreen */
this.setScreenFromOrientation();
......@@ -91,12 +90,12 @@ class Preview extends React.Component {
this.props.sessionStatus === sessionActions.Status.FETCHED) ||
(this.state.projectId !== prevState.projectId))) {
this.fetchCommunityData();
this.getExtensions(this.state.projectId);
}
if (this.state.projectId === '0' && this.state.projectId !== prevState.projectId) {
this.props.resetProject();
}
if (this.props.projectInfo.id !== prevProps.projectInfo.id) {
this.getExtensions(this.state.projectId);
if (typeof this.props.projectInfo.id === 'undefined') {
this.initCounts(0, 0);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment