*Properly pass both query and options
This commit is contained in:
parent
1847eaaeac
commit
7efa878f15
18
src/index.ts
18
src/index.ts
|
@ -159,9 +159,12 @@ export abstract class RpcQueryBase {
|
|||
}
|
||||
|
||||
public run(): this {
|
||||
this._promise = this._network
|
||||
.processQueue()
|
||||
.then(() => callModule(RPC_MODULE, this._queryType, this._query));
|
||||
this._promise = this._network.processQueue().then(() =>
|
||||
callModule(RPC_MODULE, this._queryType, {
|
||||
query: this._query,
|
||||
options: this._options,
|
||||
})
|
||||
);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
@ -201,13 +204,14 @@ export class StreamingRpcQuery extends RpcQueryBase {
|
|||
}
|
||||
|
||||
public run(): this {
|
||||
this._promise = this._network
|
||||
.processQueue()
|
||||
.then(() =>
|
||||
this._promise = this._network.processQueue().then(() =>
|
||||
connectModule(
|
||||
RPC_MODULE,
|
||||
this._queryType,
|
||||
this._query,
|
||||
{
|
||||
query: this._query,
|
||||
options: this._options,
|
||||
},
|
||||
this._options.streamHandler
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue