Skip to content

Bundle mhchem and move default props to parameters - #3

Merged
xenokratos merged 2 commits into
masterfrom
CU-86c0htxxf/mhchem-and-default-params
Oct 9, 2026
Merged

xenokratos merged 2 commits into
masterfrom
CU-86c0htxxf/mhchem-and-default-params

Conversation

@xenokratos

Copy link
Copy Markdown

React 19 ignores defaultProps on function components, so throwOnError reached KaTeX as undefined (KaTeX default: true). Any invalid expression threw and the WebView's window.onerror printed the raw "Uncaught ParseError". Defaults now live in the parameter list, same fix as upstream 3axap4eHko#19.

The inlined script also loads KaTeX's mhchem extension (same KaTeX version), so \ce{…} and \pu{…} render like they do in the MathLive editor.

React 19 drops defaultProps on function components, so throwOnError was
undefined and KaTeX threw on any invalid expression; the WebView then
printed the raw "Uncaught ParseError". Defaults now live in the
parameter list (same fix as upstream 3axap4eHko#19).

The inlined script also loads KaTeX's mhchem extension so \ce and \pu
render, matching what the MathLive editor accepts.
@xenokratos
xenokratos merged commit 2ff637d into master Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant