Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

you need to get the spaces first on the org page #1187

Merged
merged 1 commit into from
Aug 9, 2017

Conversation

jcscottiii
Copy link
Contributor

this case only happens when you refresh. before this PR, if you refreshed the org page, nothing would show. this PR fixes that by enforcing that the spaces be loaded. you have to load them first sequentially before the rest of the promises in case it doesn't finish first.

spaceActions.fetchAll().then(() => {
orgActions.toggleSpaceMenu(orgGuid);
orgActions.fetch(orgGuid);
cfApi.fetchSpaces().then(() => spaceActions.fetchAllForOrg(orgGuid));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we are fetching spaces two extra times per request?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! we shouldn't. updating

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@jcscottiii jcscottiii force-pushed the js-fix-refresh-cases branch from 9a1f942 to 8e7ebe9 Compare August 9, 2017 15:50
Copy link
Contributor

@el-mapache el-mapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@el-mapache el-mapache merged commit c137686 into master Aug 9, 2017
@el-mapache el-mapache deleted the js-fix-refresh-cases branch August 9, 2017 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants