Skip to content

Commit 122eedf

Browse files
authored
Merge pull request #816 from mathjax/enrichment_fix
Makes sure that MathJax waits for the correct promise.
2 parents 3dc8564 + ebef93b commit 122eedf

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)