File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ export class LinkOption {
7676
7777export default class QuestionModel {
7878 constructor ( options ) {
79+ // Make sure the options variable is an object
80+ options = options || { }
81+
7982 this . id = null
8083 this . answer = null
8184 this . answered = false
@@ -134,7 +137,7 @@ export default class QuestionModel {
134137
135138 // Check if we have an answer already (when we have a pre-filled form)
136139 // and set the answered property accordingly
137- if ( ! this . required && options && typeof options . answer !== 'undefined' ) {
140+ if ( ! this . required && typeof options . answer !== 'undefined' ) {
138141 this . answered = true
139142 } else if ( this . answer && ( ! this . multiple || this . answer . length ) ) {
140143 this . answered = true
You can’t perform that action at this time.
0 commit comments