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 52c9b24 commit c329cabCopy full SHA for c329cab
src/resultSet.js
@@ -42,10 +42,11 @@ class ResultSet {
42
*/
43
async parseResponse(resp) {
44
if(Array.isArray(resp)) {
45
- var len = resp.length
46
- if(resp[len - 1] instanceof ReplyError ) throw resp[len-1];
47
- if(len < 3) {
48
- this._statistics = new Statistics(resp[len - 1]);
+ let responseLen = resp.length;
+ let statisticsIdx = responseLen - 1;
+ if(resp[statisticsIdx] instanceof ReplyError ) throw resp[statisticsIdx];
+ if(responseLen < 3) {
49
+ this._statistics = new Statistics(resp[statisticsIdx]);
50
} else {
51
await this.parseResults(resp);
52
this._resultsCount = this._results.length;
0 commit comments