Skip to content

Commit

Permalink
only trigger rerender when ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Light2Dark committed Nov 14, 2024
1 parent d34a90c commit 84ad221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/plugins/impl/plotly/PlotlyPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ export const PlotlyComponent = memo(
});

// Used for rendering LaTeX. TODO: Serve this library from Marimo
const isScriptLoaded = useScript(
const scriptStatus = useScript(
"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-MML-AM_CHTML",
);
const isScriptLoaded = scriptStatus === "ready";

useEffect(() => {
const nextFigure = structuredClone(originalFigure);
Expand Down

0 comments on commit 84ad221

Please sign in to comment.