Skip to content

Commit

Permalink
fix(reactViews): use new map function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
elboman committed Jan 30, 2018
1 parent 0a4d7ba commit 6b2aa53
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/reactViews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ export function reactViewsBuilder(state: StateObject) {
if (!state.views) {
viewsDefinitionObject = { $default: pick(state, ['component']) };
} else {
viewsDefinitionObject = map(state.views, (val: any, key) => {
if (val.component) return val;
return { component: val };
});
viewsDefinitionObject = map(
state.views,
(val: any, key) => {
if (val.component) return val;
return { component: val };
},
viewsDefinitionObject,
);
}

forEach(viewsDefinitionObject, function(config, name) {
Expand Down

0 comments on commit 6b2aa53

Please sign in to comment.