Avoid accessing data[0] when not defined. Resolves issue #486.

This commit is contained in:
Davide P. Cervone 2013-05-29 11:56:41 -04:00
parent 55b5803d0a
commit 681405debc
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
MathJax.OutputJax.NativeMML = MathJax.OutputJax({
id: "NativeMML",
version: "2.2",
version: "2.2.1",
directory: MathJax.OutputJax.directory + "/NativeMML",
extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",

View File

@ -576,7 +576,7 @@
if (this.data[this.sub] == null) {type = "msup"}
var tag = this.NativeMMLelement(type);
this.NativeMMLattributes(tag);
delete this.data[0].inferred;
if (this.data[0]) {delete this.data[0].inferred}
for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i]) {this.data[i].toNativeMML(tag)}}
parent.appendChild(tag);