www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 266328ebca601baca46580be69e99a3220c8e985
parent c35cfc9e9f60ef040ee38d5d575d6d384e8073e9
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Wed, 20 Oct 2010 22:46:30 -0400

Fix a problem with IE when parentNode is null.

Apparently IE removes empty text nodes, and so the open.parentNode can
be null.  So check before trying to remove the node.  This resolves
the issue raised by
https://sourceforge.net/projects/mathjax/forums/forum/948700/topic/3902096

Diffstat:
Mmathjax/unpacked/extensions/tex2jax.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mathjax/unpacked/extensions/tex2jax.js b/mathjax/unpacked/extensions/tex2jax.js @@ -210,7 +210,7 @@ MathJax.Extension.tex2jax = { if (element === search.close) {element = close} search.close = close; var math = search.open.splitText(search.opos); - if (search.open.nodeValue === "") {search.open.parentNode.removeChild(search.open)} + if (search.open.nodeValue === "" && search.open.parentNode) {search.open.parentNode.removeChild(search.open)} while (math.nextSibling && math.nextSibling !== close) { if (math.nextSibling.nodeValue !== null) { if (math.nextSibling.nodeName === "#comment") {