@autofleet/network 1.4.8-beta-5 → 1.4.8-beta-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -165,9 +165,9 @@ module.exports = class Network {
165
165
  async getAllPagesFromQueryEndpoint(url, options = {}) {
166
166
  let currentResult = [];
167
167
 
168
- let lastResultSizeIsLessThanPerPage = false;
168
+ let moreResultsToLoad = true;
169
169
  let page = 1;
170
- while(!lastResultSizeIsLessThanPerPage && page < 100) {
170
+ while(moreResultsToLoad && page < 100) {
171
171
  const { data } = await this.post(url, {
172
172
  ...options,
173
173
  page: page,
@@ -175,7 +175,7 @@ module.exports = class Network {
175
175
  const { rows, count } = data;
176
176
  page += 1;
177
177
  currentResult = currentResult.concat(rows);
178
- lastResultSizeIsLessThanPerPage = currentResult.length < count;
178
+ moreResultsToLoad = currentResult.length < count;
179
179
  }
180
180
 
181
181
  return currentResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/network",
3
- "version": "1.4.8-beta-5",
3
+ "version": "1.4.8-beta-6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {