Skip to content

Commit

Permalink
fix: throw suspense error
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Jul 3, 2024
1 parent 2959f10 commit 565ded4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/suspense-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class SuspenseQuery {
// pass error to error boundary
if (value?.error) {
throw this.jsonToError(
new Error((value?.message ?? value?.name) as string),
value as Record<string, any>,
new Error((value?.error?.message ?? value?.error?.name) as string),
value?.error as Record<string, any>,
);
}
}
Expand Down

0 comments on commit 565ded4

Please sign in to comment.