Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix the ordering in rageshakes (#12020)
Browse files Browse the repository at this point in the history
* Fix the ordering in rageshakes

Fixes element-hq/element-web#26715

* Update src/rageshake/rageshake.ts

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
richvdh and t3chguy authored Dec 8, 2023
1 parent 75500b6 commit db24a04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rageshake/rageshake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit db24a04

Please sign in to comment.