File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -143,20 +143,19 @@ function reject(message, log) {
143
143
}
144
144
145
145
/**
146
- * Apply MathJax rendering to an element, and optionally set its text
146
+ * Apply MathJax rendering to an element, and optionally set its text.
147
147
*
148
148
* If MathJax is not available, make no changes.
149
149
*
150
- * Returns the output any number of typeset elements as an array or undefined if
151
- * MathJax was not available.
152
- *
153
150
* Parameters
154
151
* ----------
155
- * element: Node, NodeList, or jQuery selection
156
- * text: option string
152
+ * element: Node
153
+ * text: optional string
157
154
*/
158
155
function typeset ( element , text ) {
159
- element . textContent = text ;
156
+ if ( text ) {
157
+ element . textContent = text ;
158
+ }
160
159
if ( window . MathJax ) {
161
160
MathJax . Hub . Queue ( [ 'Typeset' , MathJax . Hub , element ] ) ;
162
161
}
You can’t perform that action at this time.
0 commit comments