Skip to content

Commit 3f2fb21

Browse files
author
Sergio Daniel Xalambrí
authored
Merge pull request #2 from hosmelq/master
Improve URLProvider
2 parents 2db1a90 + 98665b2 commit 3f2fb21

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/URLProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, Children, PropTypes } from 'react';
22

33
const propTypes = {
44
urls: PropTypes.object,
5-
children: PropTypes.array,
5+
children: PropTypes.element.isRequired,
66
};
77
const defaultProps = {
88
urls: {},
@@ -24,7 +24,7 @@ class UrlProvider extends Component {
2424
}
2525

2626
render() {
27-
return Children.only(this.props.children[0]);
27+
return Children.only(this.props.children);
2828
}
2929
}
3030

test/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ test('connected component', t => {
8181
{
8282
urls,
8383
},
84-
[
85-
createFactory(ConnectedApp)({ key: 1 }),
86-
]
84+
createFactory(ConnectedApp)({ key: 1 })
8785
);
8886
}
8987

0 commit comments

Comments
 (0)