From e14a8516d77b84ce5ed015daf10688bc732928eb Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 11 May 2016 20:39:42 -0400 Subject: [PATCH] Make Volker's suggested change. Issue #831. --- unpacked/jax/output/SVG/jax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 777497de6..97eb3f343 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -37,8 +37,8 @@ // Get the URL of the page (for use with xlink:href) when there // is a element on the page. // - var SVGURL = String(document.location).replace(/#.*$/,""); - if (document.getElementsByTagName("base").length === 0) SVGURL = ""; + var SVGURL = (document.getElementsByTagName("base").length === 0) ? "" : + String(document.location).replace(/#.*$/,""); SVG.Augment({ HFUZZ: 2, // adjustments for height and depth of final svg element