diff --git a/packages/controls/src/widget_description.ts b/packages/controls/src/widget_description.ts index 2b0ccdcf7f..afc6556f6e 100644 --- a/packages/controls/src/widget_description.ts +++ b/packages/controls/src/widget_description.ts @@ -67,9 +67,6 @@ export class DescriptionView extends DOMWidgetView { typeset(element: HTMLElement, text?: string): void { this.displayed.then(() => { - if ((window as any).MathJax?.Hub?.Queue) { - return typeset(element, text); - } const widget_manager: any = this.model.widget_manager; const latexTypesetter = widget_manager._rendermime?.latexTypesetter; if (latexTypesetter) { @@ -77,6 +74,8 @@ export class DescriptionView extends DOMWidgetView { element.textContent = text; } latexTypesetter.typeset(element); + } else { + return typeset(element, text); } }); }