From 5993db394b6925f8373b94c6f973a0e9f3232dda Mon Sep 17 00:00:00 2001 From: BelKed <66956532+BelKed@users.noreply.github.com> Date: Thu, 9 May 2024 18:56:48 +0200 Subject: [PATCH] fix: correctly convert `words` from map to array (#569) --- src/views/settings/CategoryBuilder.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/settings/CategoryBuilder.vue b/src/views/settings/CategoryBuilder.vue index 9f1d5d45..2828ac9d 100644 --- a/src/views/settings/CategoryBuilder.vue +++ b/src/views/settings/CategoryBuilder.vue @@ -153,8 +153,8 @@ export default { computed: { ...mapState(useCategoryStore, ['allCategoriesSelect']), words_by_duration: function () { - const words: { [key: string]: { word: string; duration: number } } = this.words; - return Object.values(words) + const words: { word: string; duration: number }[] = [...this.words.values()]; + return words .sort((a, b) => b.duration - a.duration) .filter(word => word.duration > 60) .filter(word => !this.ignored_words.includes(word.word));