We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c329cab commit ff3e848Copy full SHA for ff3e848
src/resultSet.js
@@ -42,11 +42,10 @@ class ResultSet {
42
*/
43
async parseResponse(resp) {
44
if(Array.isArray(resp)) {
45
- let responseLen = resp.length;
46
- let statisticsIdx = responseLen - 1;
47
- if(resp[statisticsIdx] instanceof ReplyError ) throw resp[statisticsIdx];
48
- if(responseLen < 3) {
49
- this._statistics = new Statistics(resp[statisticsIdx]);
+ let statistics = resp[resp.length - 1];
+ if(statistics instanceof ReplyError) throw statistics;
+ if(resp.length < 3) {
+ this._statistics = new Statistics(statistics);
50
} else {
51
await this.parseResults(resp);
52
this._resultsCount = this._results.length;
0 commit comments