diff --git a/src/rageshake/rageshake.ts b/src/rageshake/rageshake.ts index 87e9752e80c..261cef51f58 100644 --- a/src/rageshake/rageshake.ts +++ b/src/rageshake/rageshake.ts @@ -385,7 +385,8 @@ export class IndexedDBLogStore { return; } const newLines = cursor.value.lines; - lines += newLines; + // The query returns log chunks in reverse time order, so prepend this new chunk to the buffer. + lines = newLines + lines; sizeSoFar += newLines.length; // If we have now exceeded the size limit, stop.