Comparing version 0.10.5 to 0.10.6
@@ -105,5 +105,7 @@ 'use strict'; | ||
}, _this.isValid = function () { | ||
return !(0, _lodash.keys)(_this.errors).find(function (field) { | ||
return _this.errors[field]; | ||
var errorKeys = (0, _lodash.keys)(_this.errors); | ||
var errors = (0, _lodash.find)(errorKeys, function (field) { | ||
_this.errors[field]; | ||
}); | ||
return !errors; | ||
}, _this.onSubmit = function (e) { | ||
@@ -110,0 +112,0 @@ var valid = _this.isValid(); |
{ | ||
"name": "formact", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"description": "A React Set of Form Components with Context", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,3 +5,3 @@ // @flow | ||
import PropTypes from 'prop-types' | ||
import { keys } from 'lodash' | ||
import { keys, find } from 'lodash' | ||
@@ -119,3 +119,7 @@ import type { | ||
isValid = () => { | ||
return !keys(this.errors).find(field => this.errors[field]) | ||
const errorKeys = keys(this.errors) | ||
const errors = find(errorKeys, field => { | ||
this.errors[field] | ||
}) | ||
return !errors | ||
} | ||
@@ -122,0 +126,0 @@ |
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
217137
1353