react-devise-facebook-encore
Version:
A simple package to interact with Facebook LogIn API
20 lines (15 loc) • 475 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reduxForm = require('redux-form');
var _errors = require('../errors');
var formAction = function formAction(action) {
return function (data) {
return action(data).catch(_errors.ValidationError, function (err) {
// TODO: This will show only the first message per attribute.
throw new _reduxForm.SubmissionError(err.errors);
});
};
};
exports.default = formAction;