Skip to content

Commit 705f738

Browse files
committed
Merge branch 'issue1053' into hotfix-2.5. Issue #1053.
2 parents 627ab61 + b1a2b4f commit 705f738

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

unpacked/extensions/TeX/mathchoice.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
4545

4646
MML.TeXmathchoice = MML.mbase.Subclass({
4747
type: "TeXmathchoice", notParent: true,
48-
choice: function () {
49-
if (this.selection == null) {
50-
this.selection = 0;
51-
var values = this.getValues("displaystyle","scriptlevel");
52-
if (values.scriptlevel > 0) {this.selection = Math.min(3,values.scriptlevel+1)}
53-
else {this.selection = (values.displaystyle ? 0 : 1)}
54-
}
55-
return this.selection;
48+
choice: function (nocache) {
49+
var selection = 0, values = this.getValues("displaystyle","scriptlevel");
50+
if (values.scriptlevel > 0) {selection = Math.min(3,values.scriptlevel+1)}
51+
else {selection = (values.displaystyle ? 0 : 1)}
52+
return selection;
5653
},
5754
selected: function () {return this.data[this.choice()]},
5855
setTeXclass: function (prev) {return this.selected().setTeXclass(prev)},

0 commit comments

Comments
 (0)