@shopify/react-form-state
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -176,9 +176,9 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _a, onSubmit, validateOnSubmit, _b, formData, mounted, errors; | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
var _a, onSubmit, validateOnSubmit, formData, errors; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = this.props, onSubmit = _a.onSubmit, validateOnSubmit = _a.validateOnSubmit; | ||
_b = this, formData = _b.formData, mounted = _b.mounted; | ||
if (!mounted) { | ||
formData = this.formData; | ||
if (!this.mounted) { | ||
return [2 /*return*/]; | ||
@@ -196,3 +196,3 @@ } | ||
case 1: | ||
_c.sent(); | ||
_b.sent(); | ||
if (this.hasClientErrors) { | ||
@@ -202,7 +202,7 @@ this.setState({ submitting: false }); | ||
} | ||
_c.label = 2; | ||
_b.label = 2; | ||
case 2: return [4 /*yield*/, onSubmit(formData)]; | ||
case 3: | ||
errors = _c.sent(); | ||
if (!mounted) { | ||
errors = _b.sent(); | ||
if (!this.mounted) { | ||
return [2 /*return*/]; | ||
@@ -209,0 +209,0 @@ } |
{ | ||
"name": "@shopify/react-form-state", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Manage react forms tersely and type-safe with no magic.", |
@@ -162,5 +162,5 @@ import * as React from 'react'; | ||
const {onSubmit, validateOnSubmit} = this.props; | ||
const {formData, mounted} = this; | ||
const {formData} = this; | ||
if (!mounted) { | ||
if (!this.mounted) { | ||
return; | ||
@@ -190,3 +190,3 @@ } | ||
if (!mounted) { | ||
if (!this.mounted) { | ||
return; | ||
@@ -193,0 +193,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
164191
3513