Skip to content

Commit

Permalink
Fix for MathJax Preview Initialization Issue
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MadScrewdriver authored Oct 18, 2024
1 parent 22ed814 commit 30944f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wagtailmath/static/wagtailmath/js/wagtailmath.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Preview {


function initMathJaxPreview(id) {
window.wagtailMathPreviews = window.WagtailMathPreviews || {};
window.wagtailMathPreviews = window.wagtailMathPreviews || {};

window.wagtailMathPreviews[id] = new Preview(
"MathPreview-" + id,
Expand Down

0 comments on commit 30944f7

Please sign in to comment.