mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 11:10:58 +02:00
Fix mathjax error (#287)
* Updated mathjax and better-react-mathjax * Removed MathJaxWrapper. Per better-react-mathjax documentation, we were incorrectly including a new context for every equation using this wrapper. * Wrapped entire game in a MathJaxContext at GameRoot.
This commit is contained in:
+3
-2
@@ -76,6 +76,7 @@ import _functions from "lodash/functions";
|
||||
import { Apr1 } from "./Apr1";
|
||||
import { isFactionWork } from "../Work/FactionWork";
|
||||
import { V2Modal } from "../utils/V2Modal";
|
||||
import { MathJaxContext } from "better-react-mathjax";
|
||||
|
||||
const htmlLocation = location;
|
||||
|
||||
@@ -427,7 +428,7 @@ export function GameRoot(): React.ReactElement {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<MathJaxContext version={3} src={"dist/ext/MathJax-3.2.2/es5/tex-chtml.js"}>
|
||||
<ErrorBoundary key={errorBoundaryKey} softReset={softReset}>
|
||||
<BypassWrapper content={bypassGame ? mainPage : null}>
|
||||
<SnackbarProvider>
|
||||
@@ -467,6 +468,6 @@ export function GameRoot(): React.ReactElement {
|
||||
</BypassWrapper>
|
||||
</ErrorBoundary>
|
||||
<V2Modal />
|
||||
</>
|
||||
</MathJaxContext>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user