refactor(cli): flowDynamic

This commit is contained in:
Leifer Mendez
2023-02-01 16:33:57 +01:00
parent f7d90efc2f
commit 0f8a33cc0c
3 changed files with 24 additions and 23 deletions

View File

@@ -10,7 +10,10 @@ class MockDatabase {
constructor() {}
getPrevByNumber = (from) => {
const history = this.listHistory.slice().reverse()
const history = this.listHistory
.slice()
.reverse()
.filter((i) => !!i.keyword)
return history.find((a) => a.from === from)
}