Skip to content

Commit b24f3f4

Browse files
committed
correct typesetMath
1 parent cee5832 commit b24f3f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/svg_text_utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
1919
// Until we get tex integrated more fully (so it can be used along with non-tex)
2020
// allow some elements to prohibit it by attaching 'data-notex' to the original
2121
var tex = (!_context.attr('data-notex')) &&
22+
gd._context.typesetMath &&
2223
(typeof MathJax !== 'undefined') &&
2324
str.match(FIND_TEX);
2425

@@ -62,7 +63,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
6263
}
6364

6465
if(tex) {
65-
((gd && gd._context && gd._context.typesetMath && gd._promises) || []).push(new Promise(function(resolve) {
66+
((gd && gd._promises) || []).push(new Promise(function(resolve) {
6667
_context.style('display', 'none');
6768
var fontSize = parseInt(_context.node().style.fontSize, 10);
6869
var config = {fontSize: fontSize};

0 commit comments

Comments
 (0)