From bea44b3029036242ee56cc2ebf1ea2f209c769ac Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 24 Aug 2015 19:32:27 -0400 Subject: [PATCH] Avoid problem with empty base element --- unpacked/jax/output/CommonHTML/jax.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 414434b77..370d6c0a7 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -2260,10 +2260,12 @@ delta = 1.3*bbox.ic + .05; // make faked IC be closer to expeted results } var bmml = this.data[this.base]; - if ((bmml.type === "mrow" || bmml.type === "mstyle") && bmml.data.length === 1) bmml = bmml.data[0]; - if (bmml && (bmml.type === "mi" || bmml.type === "mo")) { - if (bmml.data.join("").length === 1 && bbox.rscale === 1 && !bbox.sH && - !bmml.Get("largeop")) {u = v = 0} + if (bmml) { + if ((bmml.type === "mrow" || bmml.type === "mstyle") && bmml.data.length === 1) bmml = bmml.data[0]; + if (bmml.type === "mi" || bmml.type === "mo") { + if (bmml.data.join("").length === 1 && bbox.rscale === 1 && !bbox.sH && + !bmml.Get("largeop")) {u = v = 0} + } } values.subscriptshift = (values.subscriptshift === "" ? 0 : this.CHTMLlength2em(values.subscriptshift)); values.superscriptshift = (values.superscriptshift === "" ? 0 : this.CHTMLlength2em(values.superscriptshift));