Kaynağa Gözat

:construction: Cleaned up console.logs and simplified validateAnswer

tags/0.0.3^2
tomit4 3 yıl önce
ebeveyn
işleme
e72aa525f1
1 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 3
    4
      frontend/src/views/OnboardingView.vue

+ 3
- 4
frontend/src/views/OnboardingView.vue Dosyayı Görüntüle

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

Loading…
İptal
Kaydet