diff options
| author | Adam Soltys <[email protected]> | 2025-07-19 22:55:10 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-19 22:55:10 -0700 |
| commit | 59fe8d2e24085239b15ca282c182d5c7cd1ce4de (patch) | |
| tree | baddfa93846a775e93f9253ef36ac63a4dfabc3e /lib | |
| parent | d7290476c1722b1f6d8de4cec11c75e979e893eb (diff) | |
| download | coinos-server-59fe8d2e24085239b15ca282c182d5c7cd1ce4de.tar.gz coinos-server-59fe8d2e24085239b15ca282c182d5c7cd1ce4de.zip | |
respect null tips
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/invoices.ts | 2 |
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"); |
