aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.server.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts
index 6c89912d..f294f88d 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.server.ts
+++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts
@@ -12,7 +12,7 @@ export async function load({ params: { id }, parent }) {
if (invoice.memoPrompt && invoice.memo === null)
redirect(307, `/invoice/${id}/memo`);
- if (invoice.account === user?.id)
+ if (user && invoice.account === user?.id)
error(500, { message: "Cannot send to self" });
if (!user) redirect(307, `/invoice/${id}`);