Avoid re-loading already loaded relationships. Also fixes issue where wrong

button would be displayed in account lists for unloaded relationships
This commit is contained in:
Eugen Rochko
2017-04-02 22:02:38 +02:00
parent aaa4d1b0fb
commit a23e4380b2
2 changed files with 8 additions and 5 deletions

View File

@ -5,7 +5,7 @@ const getStatuses = state => state.get('statuses');
const getAccounts = state => state.get('accounts');
const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
const getAccountRelationship = (state, id) => state.getIn(['relationships', id]);
const getAccountRelationship = (state, id) => state.getIn(['relationships', id], null);
export const makeGetAccount = () => {
return createSelector([getAccountBase, getAccountRelationship], (base, relationship) => {