Skip to content

Commit

Permalink
fix(snippets): filter by not deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 1, 2022
1 parent ea4d8f9 commit c1099e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/store/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export const useSnippetStore = defineStore('snippets', {
snippets.push(...data.value)
}

this.snippets = snippets.sort((a, b) =>
a.createdAt > b.createdAt ? -1 : 1
)
this.snippets = snippets
.filter(i => !i.isDeleted)
.sort((a, b) => (a.createdAt > b.createdAt ? -1 : 1))
},
async getSnippetsById (id: string) {
if (id) {
Expand Down

0 comments on commit c1099e7

Please sign in to comment.