Properly sort cards if order is the same

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-04-20 10:01:00 +02:00
parent a445ed672b
commit 141ab46b46
2 changed files with 5 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ export default {
return card.title.toLowerCase().includes(getters.getSearchQuery.toLowerCase())
|| card.description.toLowerCase().includes(getters.getSearchQuery.toLowerCase())
})
.sort((a, b) => a.order - b.order)
.sort((a, b) => a.order - b.order || a.createdAt - b.createdAt)
},
cardById: state => (id) => {
return state.cards.find((card) => card.id === id)