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.
2 parents f2c2bdc + 1f821e5 commit 679d6e6Copy full SHA for 679d6e6
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