From 96ad2f6533cea76627e2c09e2086cf511719d4b5 Mon Sep 17 00:00:00 2001 From: Settel Date: Thu, 2 Dec 2021 19:06:26 +0100 Subject: [PATCH] keep order of quotes constant in list while collecting quotes --- client/src/components/CollectQuotes.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/components/CollectQuotes.vue b/client/src/components/CollectQuotes.vue index 767ca72..3b0e385 100644 --- a/client/src/components/CollectQuotes.vue +++ b/client/src/components/CollectQuotes.vue @@ -19,7 +19,11 @@ export default { }, computed: { quotes() { - return this.$store.state.myQuotes.quotes + var quotes = [...this.$store.state.myQuotes.quotes] + quotes.sort((a, b) => { + return a.id.localeCompare(b.id) + }) + return quotes }, }, created() {