*Promise property should be optional and cast

This commit is contained in:
Derrick Hammer 2022-07-26 21:25:38 -04:00
parent f14f32215c
commit 9ad9010a96
1 changed files with 2 additions and 2 deletions

View File

@ -59,11 +59,11 @@ export default class RpcNetwork {
return this._relays; return this._relays;
} }
private _ready: Promise<void>; private _ready?: Promise<void>;
get ready(): Promise<void> { get ready(): Promise<void> {
if (!this._ready) { if (!this._ready) {
this._ready = this._dht.ready(); this._ready = this._dht.ready() as Promise<void>;
} }
return this._ready; return this._ready;
} }