From 2d6a4ebeaa842a621d6247e2902af4885441019c Mon Sep 17 00:00:00 2001 From: weiseng18 Date: Thu, 9 Sep 2021 14:09:46 +0800 Subject: [PATCH 1/3] fix: only typeset if MathJax is initialized --- pages/logic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/logic.js b/pages/logic.js index 29a8d9c..5bc451c 100644 --- a/pages/logic.js +++ b/pages/logic.js @@ -106,7 +106,7 @@ const Page = () => { }, [router.query]) useEffect(() => { - MathJax.typeset() + if (MathJax) MathJax.typeset() setLoading(false) }, []) From 9e896e063fd5d6fc1cebdcf974f237f92cf49aeb Mon Sep 17 00:00:00 2001 From: weiseng18 Date: Thu, 9 Sep 2021 14:17:44 +0800 Subject: [PATCH 2/3] fix: add more guards --- pages/logic.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/logic.js b/pages/logic.js index 5bc451c..bb4110c 100644 --- a/pages/logic.js +++ b/pages/logic.js @@ -106,7 +106,8 @@ const Page = () => { }, [router.query]) useEffect(() => { - if (MathJax) MathJax.typeset() + if (MathJax && MathJax.typeset && typeof MathJax.typeset === "function") + MathJax.typeset() setLoading(false) }, []) From a43cdfb526032a3aede373840c40ba90fa2c78a2 Mon Sep 17 00:00:00 2001 From: weiseng18 Date: Thu, 9 Sep 2021 14:26:36 +0800 Subject: [PATCH 3/3] chore: bump version to 0.7.1 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 594e1eb..75c69cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v0.7.1](https://github.com/weiseng18/math/compare/v0.7.0...v0.7.1) + +- fix: only typeset if MathJax is initialized [`#61`](https://github.com/weiseng18/math/pull/61) +- chore: bump version to 0.7.0 [`#58`](https://github.com/weiseng18/math/pull/58) + #### [v0.7.0](https://github.com/weiseng18/math/compare/v0.6.2...v0.7.0) +> 25 August 2021 + - Feat/matrix rref status [`#57`](https://github.com/weiseng18/math/pull/57) - Feat/truth table biconditional [`#56`](https://github.com/weiseng18/math/pull/56) - Chore/imports [`#55`](https://github.com/weiseng18/math/pull/55) diff --git a/package-lock.json b/package-lock.json index 0cf4f4d..266a8b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "math", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.7.0", + "version": "0.7.1", "license": "ISC", "dependencies": { "@chakra-ui/react": "^1.6.5", diff --git a/package.json b/package.json index 25b135f..1bf3611 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "math", - "version": "0.7.0", + "version": "0.7.1", "description": "", "main": "index.js", "scripts": {