svelte-forms-lib
svelte-forms-lib copied to clipboard
Reversing order of errors before using .map
in function handleSubmit errors were being mapped from first to last, last being the only saved one (and shown to the user), which was wrong.
Reversing the array before map() fixes this issue.