From 9ee06b87f8f4c9089b3478131f15017a242e0a2f Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 17 Jan 2022 13:17:49 -0400 Subject: [PATCH] Default values --- src/routes.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routes.js b/src/routes.js index 39403a5b..78c356bc 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1296,7 +1296,13 @@ module.exports = async ( // const limit = page * itemsPerPage; lightning.listInvoices( { reversed, index_offset: offset, num_max_invoices: itemsPerPage }, - async (err, { invoices, last_index_offset } = {}) => { + async ( + err, + { invoices, last_index_offset } = { + invoices: [], + last_index_offset: 1 + } + ) => { if (err) { logger.debug('ListInvoices Error:', err) const health = await checkHealth()