You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the actionCreator with defaults accepts only an object (see #35). A default argument of empty object will be nice, so you can call the action creator without an argument.
diff --git a/lib/createActions.js b/lib/createActions.js
index 67cdb84..68dc029 100644
--- a/node_modules/reduxsauce/lib/createActions.js
+++ b/node_modules/reduxsauce/lib/createActions.js
@@ -51,7 +51,7 @@ const createActionCreator = (name, extraPropNames, options) => {
// "properties" is defined as an object of {prop name: default value}
if (is(Object, extraPropNames)) {
const defaultProps = extraPropNames
- return (valueObject) => {
+ return (valueObject = {}) => {
const providedProps = pick(Object.keys(defaultProps), valueObject)
return { type, ...defaultProps, ...providedProps }
}
The text was updated successfully, but these errors were encountered:
It was just adding a default option, thought it would be easier as a patch. In any case I’ve moved on from the project. So I won’t have time in the near future to do a PR or tests.
Currently the actionCreator with defaults accepts only an object (see #35). A default argument of empty object will be nice, so you can call the action creator without an argument.
The text was updated successfully, but these errors were encountered: