fix: testing mathjax issue fix with script change (#416)

This commit is contained in:
Mehak Nasir
2023-01-25 13:47:54 +05:00
committed by GitHub
parent f33e3c3e3d
commit b7e5dd0e28
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ function HTMLLoader({ htmlNode, componentId, cssClassName }) {
const [loadingState, setLoadingState] = useState(window.MathJax ? 'loaded' : 'loading');
const sanitizedMath = DOMPurify.sanitize(htmlNode, { ...defaultSanitizeOptions });
const previewRef = useRef();
const mathjaxScript = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_HTMLorMML';
const mathjaxScript = 'https://cdn.jsdelivr.net/npm/mathjax@2.7.7/MathJax.js?config=TeX-MML-AM_HTMLorMML';
useEffect(() => {
let mathjaxScriptTag = document.querySelector(`script[src="${mathjaxScript}"]`);