From 59fe8d2e24085239b15ca282c182d5c7cd1ce4de Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 19 Jul 2025 22:55:10 -0700 Subject: respect null tips --- lib/invoices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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"); -- cgit v1.2.3