immer-reducer
Advanced tools
Comparing version 0.7.3 to 0.7.4
@@ -130,12 +130,5 @@ "use strict"; | ||
} | ||
// Pass args to the action object only when the reducer method | ||
// actually takes args. This for example avoids putting the event | ||
// object inside the action object when a bound action creator is | ||
// passed directly to a event handler | ||
if (method.length > 0) { | ||
return createImmerAction(type, args); | ||
} | ||
else { | ||
return createImmerAction(type, []); | ||
} | ||
// Make sure only the arguments are passed to the action object that | ||
// are defined in the method | ||
return createImmerAction(type, args.slice(0, method.length)); | ||
}; | ||
@@ -142,0 +135,0 @@ actionCreator.type = type; |
{ | ||
"name": "immer-reducer", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/immer-reducer.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24505
261