Skip to content

Commit 038f576

Browse files
committed
Add a comment
1 parent e2cec7b commit 038f576

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/vector/rageshake.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ class IndexedDBLogStore {
314314
let size = 0;
315315
for (let i = 0; i < allLogIds.length; i++) {
316316
let lines = await fetchLogs(allLogIds[i]);
317+
318+
// always include at least one log file, but only include
319+
// subsequent ones if they won't take us over the MAX_LOG_SIZE
317320
if (i > 0 && size + lines.length > MAX_LOG_SIZE) {
318321
// the remaining log IDs should be removed. If we go out of
319322
// bounds this is just []
@@ -323,6 +326,7 @@ class IndexedDBLogStore {
323326
removeLogIds = allLogIds.slice(i + 1);
324327
break;
325328
}
329+
326330
logs.push({
327331
lines: lines,
328332
id: allLogIds[i],

0 commit comments

Comments
 (0)