diff --git a/frontend/src/components/people-list/index.js b/frontend/src/components/people-list/index.js index 765f6794..aa1dea90 100644 --- a/frontend/src/components/people-list/index.js +++ b/frontend/src/components/people-list/index.js @@ -16,6 +16,7 @@ const People = (props) => { const { orgUI = {}, handleToggle, + people } = props; return ( @@ -36,7 +37,9 @@ const People = (props) => { - + { people.length > 0 + ? + :

There is nobody in this orgnaisation

}
@@ -46,6 +49,7 @@ const People = (props) => { People.propTypes = { handleToggle: React.PropTypes.func, orgUI: React.PropTypes.object, + people: React.PropTypes.array }; module.exports = People; \ No newline at end of file diff --git a/frontend/src/state/selectors.js b/frontend/src/state/selectors.js index b9f83dfb..da739a6e 100644 --- a/frontend/src/state/selectors.js +++ b/frontend/src/state/selectors.js @@ -129,12 +129,14 @@ const instancesByProjectId = (projectId) => createSelector( const peopleByOrgId = (orgId) => createSelector( [members, orgById(orgId)], (members, org) => { const matched = []; - org.members.filter((m) => { - matched.push({ - ...find(members, ['uuid', m.uuid]), - ...m + if (Object.keys(org.members).length > 0) { + org.members.filter((m) => { + matched.push({ + ...find(members, ['uuid', m.uuid]), + ...m + }); }); - }); + } return matched; } );