MathJaxSwift icon indicating copy to clipboard operation
MathJaxSwift copied to clipboard

Reset JSContext exception after processing

Open nhojb opened this issue 10 months ago • 0 comments

The current implementation never resets the JSContext exception property. This means that a single exception will pollute all subsequent calls to MathJaxSwift e.g.

  1. try tex2svg(input1) throws
  2. MathJax.context.exception is now non-nil
  3. try tex2svg(input2) should succeed, but still throws because of input1 exception

The naive fix is to reset the context.exception after checking for the current exception.

nhojb avatar Mar 31 '25 16:03 nhojb