@tanstack/form-core
Advanced tools
@@ -232,4 +232,9 @@ "use strict"; | ||
| newFormValidatorError, | ||
| isPreviousErrorFromFormValidator: currentErrorMapSource[errorMapKey] === "form", | ||
| previousErrorValue: currentErrorMap[errorMapKey] | ||
| isPreviousErrorFromFormValidator: ( | ||
| // These conditional checks are required, otherwise we get runtime errors. | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| currentErrorMapSource?.[errorMapKey] === "form" | ||
| ), | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| previousErrorValue: currentErrorMap?.[errorMapKey] | ||
| }); | ||
@@ -242,3 +247,3 @@ if (newSource === "form") { | ||
| } | ||
| if (currentErrorMap[errorMapKey] !== newErrorValue) { | ||
| if (currentErrorMap?.[errorMapKey] !== newErrorValue) { | ||
| this.setFieldMeta(field, (prev = metaHelper.defaultFieldMeta) => ({ | ||
@@ -245,0 +250,0 @@ ...prev, |
@@ -230,4 +230,9 @@ import { batch, Store, Derived } from "@tanstack/store"; | ||
| newFormValidatorError, | ||
| isPreviousErrorFromFormValidator: currentErrorMapSource[errorMapKey] === "form", | ||
| previousErrorValue: currentErrorMap[errorMapKey] | ||
| isPreviousErrorFromFormValidator: ( | ||
| // These conditional checks are required, otherwise we get runtime errors. | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| currentErrorMapSource?.[errorMapKey] === "form" | ||
| ), | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| previousErrorValue: currentErrorMap?.[errorMapKey] | ||
| }); | ||
@@ -240,3 +245,3 @@ if (newSource === "form") { | ||
| } | ||
| if (currentErrorMap[errorMapKey] !== newErrorValue) { | ||
| if (currentErrorMap?.[errorMapKey] !== newErrorValue) { | ||
| this.setFieldMeta(field, (prev = defaultFieldMeta) => ({ | ||
@@ -243,0 +248,0 @@ ...prev, |
+1
-1
| { | ||
| "name": "@tanstack/form-core", | ||
| "version": "1.27.5", | ||
| "version": "1.27.6", | ||
| "description": "Powerful, type-safe, framework agnostic forms.", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1082171
0.18%13578
0.11%