File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 113113 </a >
114114 </div >
115115 <div v-if =" timer" class =" f-timer" >
116- <span >{{ formatTime(time) }}</span >
116+ <span >{{ formatTime(time) }}</span >
117117 </div >
118118 </div >
119119 </div >
128128 */
129129
130130 import FlowFormQuestion from ' ./Question.vue'
131+ import QuestionModel from ' ../models/QuestionModel'
131132 import LanguageModel from ' ../models/LanguageModel'
132133 import { IsMobile } from ' ../mixins/IsMobile'
133134
138139 },
139140
140141 props: {
141- questions: Array ,
142+ questions: {
143+ type: Array ,
144+ validator : value => value .every (q => q instanceof QuestionModel)
145+ },
142146 language: {
143147 type: LanguageModel,
144148 default : () => new LanguageModel ()
242246 },
243247
244248 isOnLastStep () {
245- return this .activeQuestionIndex === this .questionListActivePath .length
249+ return this .numActiveQuestions > 0 && this . activeQuestionIndex === this .questionListActivePath .length
246250 },
247251
248252 isOnTimerStartStep () {
293297 */
294298 setQuestionListActivePath () {
295299 const questions = []
300+
301+ if (! this .questions .length ) {
302+ return
303+ }
304+
296305 let
297306 index = 0 ,
298307 serialIndex = 0 ,
You can’t perform that action at this time.
0 commit comments