Por alguna razón, esta parte del código está causando una devolución de llamada que ya se llama problema, si no ingresa al ciclo "if", regresa con precisión. No se puede averiguar por qué funciona parcialmente. ¿Por qué las declaraciones de devolución actúan de manera diferente?
**if (!args.is_table) { return cbk(null, {peers: forwards.peers}); }**Aquí está el error:
***if (fn === null) throw new Error("Callback was already called."); ^ Error: Callback was already called.*** module.exports = (args, cbk) => { return new Promise((resolve, reject) => { return asyncAuto({ // Final forwards table allForwards: ['forwards', ({forwards}, cbk) => { if (!args.is_table) { return cbk(null, {peers: forwards.peers}); } const isWideSize = !size || size.get().width > wideSizeCols; return cbk(null, { peers: forwards.peers, rows: [] .concat([notNull([ 'Alias', 'Earned In', 'Earned Out', 'Inbound', 'Outbound', !!isWideSize ? 'Public Key' : null, ]).map(n => !args.is_monochrome ? bold(n) : n)]) .concat(forwards.peers.map(peer => { return notNull([ chartAliasForPeer({ alias: peer.alias, icons: peer.icons, is_disconnected: peer.is_disconnected, is_forwarding: peer.is_forwarding, is_inactive: peer.is_inactive, is_pending: peer.is_pending, is_private: peer.is_private, public_key: peer.public_key, }).display, formatTokens({ is_monochrome: args.is_monochrome, tokens: peer.liquidity_outbound, }).display, !!isWideSize ? peer.public_key : null, ]); })), }); }], }, returnResult({reject, resolve, of: 'allForwards'}, cbk)); }); };