*Bug fix first promise in result which returns just an ErrTuple

This commit is contained in:
Derrick Hammer 2022-09-05 06:26:20 -04:00
parent e759d06faa
commit 85447be885
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 4 deletions

View File

@ -281,10 +281,8 @@ export class StreamingRpcQuery extends SimpleRpcQuery {
get result(): Promise<RPCResponse> { get result(): Promise<RPCResponse> {
return (this._promise as Promise<any>) return (this._promise as Promise<any>)
.then( .then((result): Promise<ErrTuple> => result)
(result): [sendUpdate: DataFn, response: Promise<ErrTuple>] => result[1] .then((response: ErrTuple) => {
)
.then((response: any) => {
if (response[1]) { if (response[1]) {
return { error: response[1] }; return { error: response[1] };
} }