@nteract/mathjax
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -40,2 +40,4 @@ "use strict"; | ||
_this.nodeRef = React.createRef(); | ||
_this.typeset = _this.typeset; | ||
@@ -149,3 +151,4 @@ return _this; | ||
this.script.type = "math/" + type + "; " + (inline ? "" : "mode=display"); | ||
this.refs.node.appendChild(this.script); | ||
this.nodeRef.current.appendChild(this.script); | ||
} | ||
@@ -168,3 +171,3 @@ | ||
value: function render() { | ||
return React.createElement("span", { ref: "node" }); | ||
return React.createElement("span", { ref: this.nodeRef }); | ||
} | ||
@@ -171,0 +174,0 @@ }]); |
{ | ||
"name": "@nteract/mathjax", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "React components for MathJax", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -18,2 +18,3 @@ // @flow | ||
script: ?HTMLScriptElement; | ||
nodeRef: React.ElementRef<*>; | ||
@@ -28,2 +29,4 @@ static defaultProps = { | ||
this.nodeRef = React.createRef(); | ||
(this: any).typeset = this.typeset; | ||
@@ -119,3 +122,4 @@ } | ||
this.script.type = `math/${type}; ${inline ? "" : "mode=display"}`; | ||
this.refs.node.appendChild(this.script); | ||
this.nodeRef.current.appendChild(this.script); | ||
} | ||
@@ -137,3 +141,3 @@ | ||
render() { | ||
return React.createElement("span", { ref: "node" }); | ||
return <span ref={this.nodeRef} />; | ||
} | ||
@@ -140,0 +144,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36861
752