You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If immediateErrors contains { someFormField: { key: 'some-error-key' } // or any other object }
and debouncedErrors contains { someFormField: [] }, the result of merging is { someFormField: [] }. ImmediateErrors value is lost, and the form control shows no errors.
I think it is the issue with _mergeWith function lines 31-38 (tho I'm not sure since this function is quite complicated):
obj[key] is always derived from underlying source[key] array. Shouldn't there be a .push of some sort appending the original obj[key] value to the created array?
Took me a while to get back to this. I think I understand the issue but I would love to understand how you encountered this error (if you still remember)? I got a fix but I need to understand how would someone get into this in order to see if it's appropriate.
If you don't remember that's okay. I'll probably run some tests only end to make sure nothing breaks and merge if it looks alright!
Describe the bug
I have encountered a bug in errors merging algorithm.
In
stores.js
you create errors store as a derived store:If immediateErrors contains
{ someFormField: { key: 'some-error-key' } // or any other object }
and debouncedErrors contains
{ someFormField: [] }
, the result of merging is{ someFormField: [] }
. ImmediateErrors value is lost, and the form control shows no errors.I think it is the issue with
_mergeWith
function lines 31-38 (tho I'm not sure since this function is quite complicated):obj[key]
is always derived from underlyingsource[key]
array. Shouldn't there be a.push
of some sort appending the originalobj[key]
value to the created array?Which package/s are you using?
felte (Svelte), @felte/reporter-svelte, @felte/validator-yup
Environment
To reproduce
No response
Small reproduction example
No response
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: