Skip to content

Commit c94dcf8

Browse files
committed
refactor: clean up
1 parent e8a73e6 commit c94dcf8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

services/invoiceService.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ export async function getNewInvoiceNumber (userId: string): Promise<string | und
9595
const invoicesWithOurPattern = userInvoices.filter(invoice => defaultPattern.test(invoice.invoiceNumber))
9696

9797
if (invoicesWithOurPattern === null || invoicesWithOurPattern.length < userInvoices.length) {
98-
if (userInvoices.length > 0) {
99-
return
100-
}
98+
return
10199
}
102100

103101
const invoiceWithTheLatestInvoiceNumber = invoicesWithOurPattern[0]

0 commit comments

Comments
 (0)