From 0a50782b0dad875abf39e068f37326b01665f930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 11 Jun 2024 14:07:48 +0200 Subject: [PATCH] Fix function context --- lib/lndhub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lndhub.js b/lib/lndhub.js index 60cf0c1..4eb18ff 100644 --- a/lib/lndhub.js +++ b/lib/lndhub.js @@ -22,7 +22,7 @@ export default class Lndhub { async handleErroredRequest (result, retryFunction, args=[]) { console.warn('API request failed:', result.message); if (result.code === 1) { - return this.reauth().then(connected => { + return this.reauth().bind(this).then(connected => { if (connected) { console.warn('Lndhub reconnected, trying again...'); return this[retryFunction](...args);