Fix function context

This commit is contained in:
Râu Cao 2024-06-11 14:07:48 +02:00
parent 2c4724638a
commit 0a50782b0d
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -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);