Another fix for dashboard loading

This commit is contained in:
Jori Lallo
2016-06-26 22:32:20 -07:00
parent 3dbe2056cc
commit bb20115f00
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ class Dashboard extends React.Component {
<Flex direction="column" flex={ true }> <Flex direction="column" flex={ true }>
{ store.isFetching ? ( { store.isFetching ? (
<AtlasPreviewLoading /> <AtlasPreviewLoading />
) : store.atlases.map((atlas) => { ) : store.atlases && store.atlases.map((atlas) => {
return (<AtlasPreview key={ atlas.id } data={ atlas } />); return (<AtlasPreview key={ atlas.id } data={ atlas } />);
}) } }) }
</Flex> </Flex>

View File

@@ -2,7 +2,7 @@ import { observable, action } from 'mobx';
import { client } from 'utils/ApiClient'; import { client } from 'utils/ApiClient';
const store = new class DashboardStore { const store = new class DashboardStore {
@observable atlases = []; @observable atlases;
@observable pagination; @observable pagination;
@observable isFetching = true; @observable isFetching = true;