From dd07e46c6a21caec4588574b41f83de80cfd49da Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Wed, 24 Oct 2018 15:38:18 -0400 Subject: [PATCH] moved getExtensions out of constructor, and out of projectInfo response --- src/views/preview/preview.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx index 4740ef3d5..b709d9e76 100644 --- a/src/views/preview/preview.jsx +++ b/src/views/preview/preview.jsx @@ -73,7 +73,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(); @@ -84,12 +83,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 {