bugfix: fix sorting of players by score in highscore table

This commit is contained in:
Settel 2022-09-25 18:05:56 +02:00
parent 5c2b99a909
commit 376a9f5642

View File

@ -20,13 +20,17 @@
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { usePlayersStore } from '@/stores/PlayersStore'
import { useGameinfoStore } from "@/stores/GameinfoStore"
const title = useGameinfoStore().gameInfo.name
const players = usePlayersStore().players
players.sort((a, b) => {
return b.score - a.score
const players = computed(() => {
const p = usePlayersStore().players
p.sort((a, b) => {
return b.score - a.score
})
return p
})
</script>