Skip to content

Commit 5afd2e8

Browse files
committed
Allow config() and start() to be called from within a typset() callback. Issue #323.
1 parent 702d90e commit 5afd2e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,9 @@ function ReturnResult(result) {
773773
state.n = GLYPH.n;
774774
state.ID = ID;
775775
}
776-
callback(result, data);
777776
serverState = STATE.READY;
778-
StartQueue();
777+
callback(result, data);
778+
if (serverState === STATE.READY) StartQueue();
779779
}
780780

781781
//
@@ -809,8 +809,8 @@ function RestartMathJax() {
809809
MathJax.Hub.queue.queue = []; // clear MathJax queue, so pending operations won't fire
810810
MathJax = timer = window = document = html = content = null;
811811
ReportError("Timeout waiting for MathJax: restarting");
812-
serverState = STATE.STOPPED;
813812
}
813+
serverState = STATE.STOPPED;
814814
GetWindow();
815815
ConfigureMathJax();
816816
StartMathJax();

0 commit comments

Comments
 (0)