Skip to content

Commit c3e82bb

Browse files
committed
Fix formatTicket function error
1 parent fa8bb21 commit c3e82bb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/support-page/Example.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828
<div v-else>
2929
<span class="f-tagline">Support page &gt; Ticket status</span>
30-
<span class="fh2">Good news - the wheels are turning, your ticket {{" No. " + formatTicket(questions[2].model) + " " }} is being processed!😉</span>
30+
<span class="fh2">Good news - the wheels are turning, your ticket No. {{ formatTicket(questions[2].model) }} is being processed!😉</span>
3131
<p class="f-description"><span>Have a great day!</span></p>
3232
</div>
3333
</div>
@@ -49,7 +49,7 @@
4949
import Question from '../../src/components/Question.vue'
5050
import LanguageModel from '../../src/models/LanguageModel'
5151
// If using the npm package, use the following line instead of the ones above.
52-
// import FlowForm, { QuestionModel, QuestionType, ChoiceOption, LinkOption, LanguageModel } from '@ditdot-dev/vue-flow-form'
52+
// import FlowForm, { Question, LanguageModel } from '@ditdot-dev/vue-flow-form'
5353
5454
export default {
5555
name: 'example',
@@ -85,7 +85,7 @@
8585
technical_issue: 'technical_issue',
8686
enter_ticket: 'enter_ticket'
8787
},
88-
model: null,
88+
model: '',
8989
},
9090
{
9191
type: 'multiplechoice',
@@ -112,7 +112,7 @@
112112
jump: {
113113
faq_no: 'faq_no'
114114
},
115-
model: null,
115+
model: '',
116116
},
117117
{
118118
type: 'text',
@@ -127,7 +127,7 @@
127127
jump: {
128128
_other: '_submit'
129129
},
130-
model: null
130+
model: ''
131131
},
132132
{
133133
type: 'longText',
@@ -136,7 +136,7 @@
136136
title: 'Please describe your problem.',
137137
required: true,
138138
placeholder: 'Start typing here...',
139-
model: null
139+
model: ''
140140
}
141141
]
142142
}
@@ -199,7 +199,7 @@
199199
},
200200
201201
formatTicket(ticket) {
202-
return ticket.replace(/-/g, '')
202+
return ticket && ticket.replace(/-/g, '')
203203
},
204204
205205
getTicket() {

0 commit comments

Comments
 (0)