Skip to content

Commit a29bd5e

Browse files
committed
lnc: fix error when calling connect after run
1 parent 86deb5c commit a29bd5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/lnc.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ export default class LNC {
138138
// do not attempt to connect multiple times
139139
if (this.isConnected) return;
140140

141-
await this.run();
142-
143141
// ensure the WASM binary is loaded
144-
if (!this.isReady) await this.waitTilReady();
142+
if (!this.isReady) {
143+
await this.run();
144+
await this.waitTilReady();
145+
}
145146

146147
const { pairingPhrase, localKey, remoteKey, serverHost } =
147148
this.credentials;

0 commit comments

Comments
 (0)