Skip to content

Commit

Permalink
Merge pull request #24801 from code-dot-org/revert-text-responses
Browse files Browse the repository at this point in the history
Revert "wait for scripts to load before requesting text responses"
  • Loading branch information
davidsbailey committed Sep 14, 2018
2 parents 80f0a2d + 574c86e commit f051604
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/src/templates/teacherDashboard/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ export function renderTextResponsesTable(section, validScripts) {
registerReducers({textResponses, scriptSelection, sectionData});
const store = getStore();
store.dispatch(setSection(section));
store.dispatch(loadValidScripts(section, validScripts)).then(() => {
const scriptId = store.getState().scriptSelection.scriptId;
store.dispatch(asyncLoadTextResponses(section.id, scriptId, () => {
ReactDOM.render(
<Provider store={store}>
<TextResponses sectionId={section.id}/>
</Provider>,
element
);
}));
});
store.dispatch(loadValidScripts(section, validScripts));

const scriptId = store.getState().scriptSelection.scriptId;
store.dispatch(asyncLoadTextResponses(section.id, scriptId, () => {
ReactDOM.render(
<Provider store={store}>
<TextResponses sectionId={section.id}/>
</Provider>,
element
);
}));
}

export function renderStatsTable(section) {
Expand Down

0 comments on commit f051604

Please sign in to comment.