Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-03-14 01:10:21 +0300
committerdartcafe <github@dartcafe.de>2021-03-14 01:10:21 +0300
commit2fb4899ca850760b0ddc2af5404c21093cf4cc5a (patch)
treea56ac27abd2aab616d7cfa973abacdd071ad34fb /src/js/store/modules/poll.js
parent6349ae8f0d25c9d04a474ca15e62720801f9b159 (diff)
return unique voter array
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/store/modules/poll.js')
-rw-r--r--src/js/store/modules/poll.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/js/store/modules/poll.js b/src/js/store/modules/poll.js
index b7d620a2..69ceaccf 100644
--- a/src/js/store/modules/poll.js
+++ b/src/js/store/modules/poll.js
@@ -25,6 +25,7 @@ import axios from '@nextcloud/axios'
import moment from '@nextcloud/moment'
import { generateUrl } from '@nextcloud/router'
import acl from './subModules/acl.js'
+import { uniqueArrayOfObjects } from '../../helpers/arrayHelper.js'
const defaultPoll = () => {
return {
@@ -105,15 +106,18 @@ const getters = {
voted: false,
})
}
- return participants
+
+ return uniqueArrayOfObjects(participants)
+
},
participantsVoted: (state, getters, rootState) => {
- return rootState.votes.list.map(item => ({
+ return uniqueArrayOfObjects(rootState.votes.list.map(item => ({
userId: item.userId,
displayName: item.displayName,
isNoUser: item.isNoUser,
- }))
+ })))
+
},
}