*Bug fix first promise in result which returns just an ErrTuple
This commit is contained in:
parent
e759d06faa
commit
85447be885
|
@ -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] };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue