Skip to content

Commit

Permalink
fix: initial mutation state
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Jan 27, 2025
1 parent 9f7d7f9 commit 709203d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-houses-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/vue": patch
---

fix: initial mutation state
5 changes: 1 addition & 4 deletions packages/vue/src/mutate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function mutationResultToVue<A, E>(
): Res<A, E> {
switch (mutationResult._tag) {
case "Initial": {
return { loading: true, data: undefined, error: undefined }
return { loading: mutationResult.waiting, data: undefined, error: undefined }
}
case "Success": {
return {
Expand All @@ -40,9 +40,6 @@ export function mutationResultToVue<A, E>(
error: mutationResult.cause
}
}
case "Initial": {
return { loading: false, data: undefined, error: undefined }
}
}
}

Expand Down

0 comments on commit 709203d

Please sign in to comment.