Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmoeschinger committed Nov 16, 2017
1 parent d96e176 commit 783be03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redest",
"version": "2.10.0",
"version": "2.10.1",
"description": "Rest Api communication made easy",
"main": "distribution/index.js",
"repository": "[email protected]:momentechnologies/redest.git",
Expand Down
18 changes: 10 additions & 8 deletions src/selectors/selectMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ export default createSelector(

// If single look for matching ids
if (isSingle(filter) && reducerState.entities[filter]) {
const metaWithId = Object.keys(
reducerState.meta
).find(currentMetaKey => {
if (!reducerState.meta[currentMetaKey].ids) return false;
return (
reducerState.meta[currentMetaKey].ids.indexOf(filter) !== -1
);
});
const metaWithId = Object.keys(reducerState.meta).find(
currentMetaKey => {
if (!reducerState.meta[currentMetaKey].ids) return false;
return (
reducerState.meta[currentMetaKey].ids.indexOf(
filter
) !== -1
);
}
);
if (metaWithId) return reducerState.meta[metaWithId];
return newMeta();
}
Expand Down

0 comments on commit 783be03

Please sign in to comment.