From b9bdaf5803f489f2766b688c4cef41da89b28464 Mon Sep 17 00:00:00 2001 From: Pjotr Savitski Date: Wed, 15 Sep 2021 20:14:16 +0300 Subject: [PATCH] Fixed an issue with a code example An example returned document.querySelector result passed as a callback to the typeset() function which threw an exception because MathJax.typesetPromise() requires an iterable not just a Node. Changed the example to return an array with that node instead. --- web/typeset.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/typeset.rst b/web/typeset.rst index 584811f5..b6f840c4 100644 --- a/web/typeset.rst +++ b/web/typeset.rst @@ -94,7 +94,7 @@ DOM modifications and returns the array of elements to typeset, or typeset(() => { const math = document.querySelector('#math'); math.innerHTML = '$$\\frac{a}{1-a^2}$$'; - return math; + return [math]; }); would replace the contents of the element with ``id="math"`` with the