Prevent infinite loop if one of the jax fails to load (due to failure to compile or timeout waiting for it to load)

This commit is contained in:
Davide P. Cervone 2011-08-03 16:04:14 -04:00
parent 9156092878
commit 418e5a293e
2 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ if (!window.MathJax) {window.MathJax= {}}
if (!MathJax.Hub) { // skip if already loaded
MathJax.version = "1.1a";
MathJax.fileversion = "1.1.9";
MathJax.fileversion = "1.1.10";
/**********************************************************/
@ -1782,8 +1782,12 @@ MathJax.Hub.Startup = {
return this;
},
Process: function (element) {
var load = AJAX.Require(this.directory+"/"+this.JAXFILE);
if (!load.called) {this.constructor.prototype.Process = function (element) {return load}}
var load, file = this.directory+"/"+this.JAXFILE;
this.constructor.prototype.Process = function (element) {
if (!load.called) {return load}
throw Error(file+" failed to load properly");
};
load = AJAX.Require(file);
return load;
},
Translate: function (element) {