File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
addon/qtype/calculated/providers Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ export class AddonQtypeCalculatedHandler implements CoreQuestionHandler {
191191 let unitsLeft = false ;
192192 let match = null ;
193193
194- if ( ! question . settings ) {
194+ if ( ! question . settings || question . settings . unitsleft === null ) {
195195 // We don't know if units should be before or after so we check both.
196196 match = answer . match ( new RegExp ( '^' + regexString ) ) ;
197197 if ( ! match ) {
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export class CoreQuestionBaseComponent {
108108 this . question . select = selectModel ;
109109
110110 // Check which one should be displayed first: the select or the input.
111- if ( this . question . settings ) {
111+ if ( this . question . settings && this . question . settings . unitsleft !== null ) {
112112 this . question . selectFirst = this . question . settings . unitsleft == '1' ;
113113 } else {
114114 const input = questionEl . querySelector ( 'input[type="text"][name*=answer]' ) ;
@@ -166,7 +166,7 @@ export class CoreQuestionBaseComponent {
166166 }
167167
168168 // Check which one should be displayed first: the options or the input.
169- if ( this . question . settings ) {
169+ if ( this . question . settings && this . question . settings . unitsleft !== null ) {
170170 this . question . optionsFirst = this . question . settings . unitsleft == '1' ;
171171 } else {
172172 const input = questionEl . querySelector ( 'input[type="text"][name*=answer]' ) ;
You can’t perform that action at this time.
0 commit comments