Skip to content

Commit

Permalink
refactor: keep the same return type
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed May 19, 2024
1 parent f4e0e5e commit ca4ceca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/realworld/src/ui/pages/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ function updateUser(ev: SubmitEvent) {
const current = yield* _(CurrentUser)

// Only allow one submit request at a time
if (AsyncData.isLoadingOrRefreshing(current)) return
if (AsyncData.isLoadingOrRefreshing(current)) return current

const data = new FormData(ev.target)
const input = yield* _(data, parseFormData(UpdateUserInput.fields))
const exit = yield* _(Users.update(input), Effect.exit)
yield* _(RefSubject.set(CurrentUser, AsyncData.fromExit(exit)))
return yield* _(RefSubject.set(CurrentUser, AsyncData.fromExit(exit)))
}),
"ParseError",
(error) => {
Expand Down

0 comments on commit ca4ceca

Please sign in to comment.