Skip to content

Commit

Permalink
Init executeRef also when executeFormAction is used
Browse files Browse the repository at this point in the history
Without assigning the result of a resolved form action to the
exectureRef the `onError` callback is not called
  • Loading branch information
andresgutgon committed Jun 24, 2024
1 parent 8da516d commit 82ccb7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/zsa-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export const useServerAction = <
startTransition(() => {
internalExecute(opts[0])
})
executeRef.current = resolve
resolve(null)
})
},
Expand Down

0 comments on commit 82ccb7f

Please sign in to comment.