Skip to content

Commit

Permalink
fix(playground): return promise from usePersistWithFeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Apr 22, 2024
1 parent a49c4ae commit 9dd9f6d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const usePersistWithFeedback = () => {
const triggerPersist = usePersist()
const { onPersistSuccess, onPersistError } = usePersistFeedbackHandlers()
return useCallback(() => {
triggerPersist()
return triggerPersist()
.then(onPersistSuccess)
.catch(onPersistError)
}, [onPersistError, onPersistSuccess, triggerPersist])
Expand Down

0 comments on commit 9dd9f6d

Please sign in to comment.