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