Skip to content

Commit c1099e7

Browse files
committed
fix(snippets): filter by not deleted
1 parent ea4d8f9 commit c1099e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/renderer/store/snippets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export const useSnippetStore = defineStore('snippets', {
5555
snippets.push(...data.value)
5656
}
5757

58-
this.snippets = snippets.sort((a, b) =>
59-
a.createdAt > b.createdAt ? -1 : 1
60-
)
58+
this.snippets = snippets
59+
.filter(i => !i.isDeleted)
60+
.sort((a, b) => (a.createdAt > b.createdAt ? -1 : 1))
6161
},
6262
async getSnippetsById (id: string) {
6363
if (id) {

0 commit comments

Comments
 (0)