redux-form-reducer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -44,6 +44,12 @@ 'use strict'; | ||
return _extends({}, state, { | ||
values: _extends({}, state.values, _defineProperty({}, action.payload.field, action.payload.value)), | ||
errors: _extends({}, state.errors, _defineProperty({}, action.payload.field, validationFunction())) | ||
}); | ||
if (validationFunction) { | ||
return _extends({}, state, { | ||
values: _extends({}, state.values, _defineProperty({}, action.payload.field, action.payload.value)), | ||
errors: _extends({}, state.errors, _defineProperty({}, action.payload.field, validationFunction(action.payload.value))) | ||
}); | ||
} else { | ||
return _extends({}, state, { | ||
values: _extends({}, state.values, _defineProperty({}, action.payload.field, action.payload.value)) | ||
}); | ||
} | ||
} | ||
@@ -61,5 +67,9 @@ | ||
return state; | ||
if (extendReducer) { | ||
return extendReducer(state, action); | ||
} else { | ||
return state; | ||
} | ||
}; | ||
} | ||
module.exports = exports['default']; |
{ | ||
"name": "redux-form-reducer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
8960
58