Skip to content

Commit

Permalink
Modify initializeComponent to call renderComponent in a function
Browse files Browse the repository at this point in the history
- Previously, renderComponent(response.data) was called before the document was ready.
  • Loading branch information
weiqingtoh committed May 11, 2017
1 parent 107feea commit a1e1591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app/lib/helpers/initializeComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const initializeComponent = (Component, nodeId, storeCreator) => {

const params = { format: 'json' };
axios.get('', { params }).then((response) => {
$(document).ready(renderComponent(response.data));
$(document).ready(() => { renderComponent(response.data); });
});
};

Expand Down

0 comments on commit a1e1591

Please sign in to comment.