diff options
Diffstat (limited to 'src/routes/(app)/send')
| -rw-r--r-- | src/routes/(app)/send/+layout.svelte | 2 | ||||
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.server.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/(app)/send/+layout.svelte b/src/routes/(app)/send/+layout.svelte index 5e379c32..9e14fa39 100644 --- a/src/routes/(app)/send/+layout.svelte +++ b/src/routes/(app)/send/+layout.svelte @@ -9,7 +9,7 @@ let cancel = () => goto(`/${user.username}`); </script> -{#if user.haspin && (!$pin || $pin?.length !== 6)} +{#if user?.haspin && (!$pin || $pin?.length !== 6)} <Pin bind:value={$pin} {cancel} /> {/if} 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 }; |
