Skip to content

Commit

Permalink
answer-widget-number: if initial value is a number, convert it to a s…
Browse files Browse the repository at this point in the history
…tring

fixes #1056
  • Loading branch information
christianp committed Nov 1, 2023
1 parent 1e4593a commit ce7a416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/default/files/scripts/answer-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Numbas.queueScript('answer-widgets',['knockout','util','jme','jme-display'],func
return '';
}
if(util.isNumber(n, vm.allowFractions, vm.allowedNotationStyles)) {
return n;
return n + '';
}
return Numbas.math.niceNumber(n,{style: vm.allowedNotationStyles[0]}) || '';
}
Expand Down

0 comments on commit ce7a416

Please sign in to comment.