From 30944f7c375e6df947425791b5d743e9899fb480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franciszek=20=C5=81ajszczak?= <33846428+MadScrewdriver@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:00:20 +0200 Subject: [PATCH] Fix for MathJax Preview Initialization Issue The wagtailMathPreviews object was being reinitialized on every preview setup due to inconsistent casing, causing previously initialized previews to be overwritten and resulting in errors during Update() calls. --- src/wagtailmath/static/wagtailmath/js/wagtailmath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wagtailmath/static/wagtailmath/js/wagtailmath.js b/src/wagtailmath/static/wagtailmath/js/wagtailmath.js index eebfcef..43b5e92 100644 --- a/src/wagtailmath/static/wagtailmath/js/wagtailmath.js +++ b/src/wagtailmath/static/wagtailmath/js/wagtailmath.js @@ -81,7 +81,7 @@ class Preview { function initMathJaxPreview(id) { - window.wagtailMathPreviews = window.WagtailMathPreviews || {}; + window.wagtailMathPreviews = window.wagtailMathPreviews || {}; window.wagtailMathPreviews[id] = new Preview( "MathPreview-" + id,