Skip to content

Commit 13f51bd

Browse files
committed
falsy value check on connect
1 parent c76aac8 commit 13f51bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/connect.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ function getProps(component) {
5555
* @param mapActionsToProps
5656
* @returns Object
5757
*/
58-
export default function connect(mapStateToProps = noop, mapActionsToProps = noop) {
58+
export default function connect(mapStateToProps, mapActionsToProps) {
59+
mapStateToProps = mapStateToProps || noop;
60+
mapActionsToProps = mapActionsToProps || noop;
61+
5962
return (children) => {
6063

6164
/** @namespace children.collect */

0 commit comments

Comments
 (0)