Skip to content

Commit bc7a4ac

Browse files
authored
Merge pull request #1311 from mathjax/update/no-enrichment
Check that enrichment is enabled before starting webworker
2 parents 8769f75 + 2c15c61 commit bc7a4ac

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ts/a11y/speech.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ export function SpeechMathItemMixin<
109109
this.state(STATE.ATTACHSPEECH);
110110
if (
111111
this.isEscaped ||
112-
!(document.options.enableSpeech || document.options.enableBraille)
112+
!(document.options.enableSpeech || document.options.enableBraille) ||
113+
!document.options.enableEnrichment
113114
) {
114115
return;
115116
}
@@ -274,7 +275,11 @@ export function SpeechMathDocumentMixin<
274275
*/
275276
public attachSpeech(): SpeechMathDocument<N, T, D> {
276277
if (!this.processed.isSet('attach-speech')) {
277-
if (this.options.enableSpeech || this.options.enableBraille) {
278+
const options = this.options;
279+
if (
280+
options.enableEnrichment &&
281+
(options.enableSpeech || options.enableBraille)
282+
) {
278283
this.getWebworker();
279284
for (const math of this.math) {
280285
(math as SpeechMathItem<N, T, D>).attachSpeech(this);

0 commit comments

Comments
 (0)