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 b04cdd2 commit bb21ed0Copy full SHA for bb21ed0
redisinsight/ui/src/services/workbenchStorage.ts
@@ -315,7 +315,7 @@ async function cleanupDatabaseHistory(dbId: string) {
315
const commandsHistory: CommandHistoryType = await getLocalWbHistory(dbId)
316
let size = 0
317
// collect items up to maxItemsPerDb
318
- const update = commandsHistory.reduce((acc, commandsHistoryElement) => {
+ const update = commandsHistory.reverse().reduce((acc, commandsHistoryElement) => {
319
if (size >= WORKBENCH_HISTORY_MAX_LENGTH) {
320
return acc
321
}
0 commit comments