From 681405debccb04f6993738ce2d684e6341484b19 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 29 May 2013 11:56:41 -0400 Subject: [PATCH 1/2] Avoid accessing data[0] when not defined. Resolves issue #486. --- unpacked/jax/output/NativeMML/config.js | 2 +- unpacked/jax/output/NativeMML/jax.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/NativeMML/config.js b/unpacked/jax/output/NativeMML/config.js index ce33a8918..6160f35c4 100644 --- a/unpacked/jax/output/NativeMML/config.js +++ b/unpacked/jax/output/NativeMML/config.js @@ -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", diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index 5e866301e..dadf3d434 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -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); From 1cc5064462fc565897ac0fbfec8b1100cf9572b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Wed, 12 Jun 2013 16:06:56 +0200 Subject: [PATCH 2/2] Avoid accessing data[0] with under/over scripts and mlabeledtr too. Address review command of issue #486. --- unpacked/jax/output/NativeMML/jax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index dadf3d434..a47983e01 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -594,7 +594,7 @@ if (this.data[this.over] == null) {type = "munder"} 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); @@ -746,7 +746,7 @@ } } - if (nMML.tableLabelBug) { + if (nMML.tableLabelBug && this.data[0]) { var side = this.parent.Get("side").charAt(0), align = HUB.config.displayAlign.charAt(0), indent = HUB.config.displayIndent;