Resolve "Selecting Yes No Question without custom labels doesnt show answer options in the preview" (#155)
requested to merge 155-selecting-yes-no-question-without-custom-labels-doesnt-show-answer-options-in-the-preview into main
About the issue
The error came from the fact that the options
key on the Question type is potentially undefined. When this is the case the widget match function fails due to an undefined property read error
About the fix
Using the optional chaining operator (?.
) makes the access undefined safe. I also changed the type definition to indicate that options
may be undefined
Closes #155 (closed)