Skip to content

Commit 3fdbdae

Browse files
authored
Merge pull request #1326 from mathjax/fix/startup-promise
Include the menu loading promises in the default startup page ready promise chain. (mathjax/MathJax#3401)
2 parents 04af7e4 + c6d089e commit 3fdbdae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ts/components/startup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ export interface MathJaxConfig extends MJConfig {
7171
/**
7272
* Generic types for the standard MathJax objects
7373
*/
74-
export type MATHDOCUMENT = MathDocument<any, any, any>;
74+
export type MATHDOCUMENT = MathDocument<any, any, any> & {
75+
menu?: { loadingPromise: Promise<void> };
76+
};
7577
export type HANDLER = Handler<any, any, any>;
7678
export type DOMADAPTOR = DOMAdaptor<any, any, any>;
7779
export type INPUTJAX = InputJax<any, any, any>;
@@ -325,6 +327,7 @@ export abstract class Startup {
325327
? (Startup.output as COMMONJAX).font.loadDynamicFiles()
326328
: Promise.resolve()
327329
)
330+
.then(() => Startup.document.menu?.loadingPromise)
328331
.then(
329332
CONFIG.typeset && MathJax.typesetPromise
330333
? () => Startup.typesetPromise(CONFIG.elements)

0 commit comments

Comments
 (0)