Просмотр исходного кода

:construction: Cleaned up console.logs and simplified validateAnswer

tabs-content
tomit4 3 лет назад
Родитель
Сommit
91cd939ed7
1 измененных файлов: 3 добавлений и 4 удалений
  1. 3
    4
      frontend/src/views/OnboardingView.vue

+ 3
- 4
frontend/src/views/OnboardingView.vue Просмотреть файл

@@ -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)}`)

Загрузка…
Отмена
Сохранить