mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-12 18:43:50 +00:00
fix(#79): Add check for result.data
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
const handleSubmit: SubmitFunction = ({}) => {
|
const handleSubmit: SubmitFunction = ({}) => {
|
||||||
return async ({ result, update }) => {
|
return async ({ result, update }) => {
|
||||||
if (result.data.success) {
|
if (result.data && result.data.success) {
|
||||||
submitted = true;
|
submitted = true;
|
||||||
} else {
|
} else {
|
||||||
error = result.error?.message || 'Form submission failed';
|
error = result.error?.message || 'Form submission failed';
|
||||||
|
|||||||
Reference in New Issue
Block a user