diff --git a/lifetracker-vue/src/services/appwrite.js b/lifetracker-vue/src/services/appwrite.js index 4dc57c6..0ae5992 100644 --- a/lifetracker-vue/src/services/appwrite.js +++ b/lifetracker-vue/src/services/appwrite.js @@ -84,7 +84,8 @@ class AppwriteService { var documents = []; // Start with nothing loaded var limit = 100; - while(limit > 0){ // Make repeated requests until we hit the numEntries + while(limit > 0){ + // Make repeated requests until we hit the numEntries let newEntries = (await this.database.listDocuments( this.databaseId, this.collectionId, [ Query.orderAsc("date"), @@ -96,7 +97,8 @@ class AppwriteService { documents = documents.flat(); offset += limit; // Increment offset by the amount we just loaded - limit = numEntries - offset; // This might not work + limit = numEntries - offset; + if(limit > 100){ limit = 100} // This might not work // console.log(numEntries + " entries; offset " + offset + "; limit " + limit); };