aboutsummaryrefslogtreecommitdiff
path: root/src/components/poll/poll.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/poll/poll.js')
-rw-r--r--src/components/poll/poll.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js
index e4d6869a..9ce0e29e 100644
--- a/src/components/poll/poll.js
+++ b/src/components/poll/poll.js
@@ -1,4 +1,5 @@
import Timeago from 'components/timeago/timeago.vue'
+import genRandomSeed from '../../services/random_seed/random_seed.service.js'
import RichContent from 'components/rich_content/rich_content.jsx'
import { forEach, map } from 'lodash'
@@ -13,7 +14,7 @@ export default {
return {
loading: false,
choices: [],
- randomSeed: `${Math.random()}`.replace('.', '-')
+ randomSeed: genRandomSeed()
}
},
created () {
@@ -37,7 +38,7 @@ export default {
return (this.poll && this.poll.options) || []
},
expiresAt () {
- return (this.poll && this.poll.expires_at) || 0
+ return (this.poll && this.poll.expires_at) || null
},
expired () {
return (this.poll && this.poll.expired) || false