Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Correct object vote count
Browse files Browse the repository at this point in the history
  • Loading branch information
kikakkz committed Dec 6, 2023
1 parent 048fbf3 commit 5ec1694
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions webui/src/stores/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,7 @@ export const useActivityStore = defineStore('activity', {
objectVoteCount (): (id: number, objectId: string) => number {
return (id: number, objectId: string) => {
return Number(
new Map(
new Map(
Object.entries(Object.entries(this.activities.get(id)?.voters || new Map<string, Array<string>>()))).get(objectId)
).size)
(new Map<string, Array<string>>(Object.entries(this.activities.get(id)?.voters || new Map<string, Array<string>>())).get(objectId) || []).length)
}
},
activity (): (id: number) => Activity | undefined {
Expand Down

0 comments on commit 5ec1694

Please sign in to comment.