|
|
@@ -62,13 +62,12 @@ export default {
|
|
62
|
62
|
updateAnswers(payload) {
|
|
63
|
63
|
// null payload is passed on splash page
|
|
64
|
64
|
if (payload) {
|
|
65
|
|
- console.log('this.survey >>', this.survey)
|
|
66
|
65
|
const k = payload.question.survey_stage
|
|
67
|
66
|
this.answered[k] = payload.input
|
|
|
67
|
+
|
|
68
|
68
|
// TODO: render message to user on why they cannot proceed
|
|
69
|
|
- if (!this.survey.validateAnswer(this.answered)) {
|
|
70
|
|
- return console.error('invalid answer')
|
|
71
|
|
- }
|
|
|
69
|
+ if (!this.survey.validateAnswer(this.answered)) return
|
|
|
70
|
+
|
|
72
|
71
|
// once validated, don't log password in answered object
|
|
73
|
72
|
this.answered[k] = k === 'password' ? undefined : payload.input
|
|
74
|
73
|
console.log(`Updated answers: ${JSON.stringify(this.answered)}`)
|