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 2265cee commit aba1579Copy full SHA for aba1579
utils/progresses.js
@@ -149,10 +149,11 @@ const buildRangeProgressQuery = (queryParams) => {
149
const getProgressRecords = async (query, queryParams) => {
150
const { startDate, endDate } = queryParams;
151
const docsData = {};
152
- const progressesDocs = (await query.get()).docs;
153
- if (!progressesDocs.size) {
+ const queryResult = await query.get();
+ if (!queryResult.size) {
154
throw new NotFound(PROGRESS_DOCUMENT_NOT_FOUND);
155
}
156
+ const progressesDocs = queryResult.docs;
157
progressesDocs.forEach((doc) => {
158
const date = new Date(doc.data().date).toISOString().slice(0, 10);
159
docsData[date] = true;
0 commit comments