aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/invoices.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts
index d624ac6b..1e08140a 100644
--- a/lib/invoices.ts
+++ b/lib/invoices.ts
@@ -35,7 +35,7 @@ export const generate = async ({ invoice, user }) => {
} = invoice;
amount = parseInt(amount || 0);
- tip = parseInt(tip) || null;
+ tip = tip == null ? null : parseInt(tip);
if (user) user = await getUser(user.username);
if (!user) fail("user not provided");