*Promise property should be optional and cast
This commit is contained in:
parent
f14f32215c
commit
9ad9010a96
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue