Fix problem with taking style of null element reported by Fred in issue #210.

This commit is contained in:
Davide P. Cervone 2012-09-01 12:27:10 -04:00
parent 2f8a30a362
commit 42998e00e5
3 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1015,7 +1015,7 @@
svg.element.setAttribute("className","mjx-svg-"+this.type);
}
var style = this.Get("style");
if (style) {
if (style && svg.element) {
svg.element.style.cssText = style;
if (svg.element.style.fontSize) {svg.element.style.fontSize = ""} // handled by scale
svg.element.style.border = svg.element.style.padding = "";
@ -1430,7 +1430,9 @@
}
this.SVGhandleColor(svg);
if (!svg.element.firstChild) {delete svg.element}
console.log("6");
this.SVGsaveData(svg);
console.log("7");
return svg;
}
});