Skip to content

Commit ebef93b

Browse files
committed
Makes sure that MathJax waits for the correct promise.
1 parent ba81088 commit ebef93b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ts/a11y/semantic-enrich.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export function EnrichedMathItemMixin<N, T, D, B extends Constructor<AbstractMat
129129
if (!this.isEscaped && (document.options.enableEnrichment || force)) {
130130
if (document.options.sre.speech !== currentSpeech) {
131131
currentSpeech = document.options.sre.speech;
132-
mathjax.retryAfter(Sre.setupEngine(document.options.sre));
132+
mathjax.retryAfter(
133+
Sre.setupEngine(document.options.sre).then(
134+
() => Sre.sreReady()));
133135
}
134136
const math = new document.options.MathItem('', MmlJax);
135137
try {

0 commit comments

Comments
 (0)