From 5420b79421960ed9c23944bc2d828569446da172 Mon Sep 17 00:00:00 2001 From: joyqat Date: Fri, 7 Aug 2020 16:53:36 +0800 Subject: [PATCH] fix: multiple has-jax in classlist --- layouts/partials/script/single-script.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/script/single-script.html b/layouts/partials/script/single-script.html index 407e1e4..ab5ec91 100644 --- a/layouts/partials/script/single-script.html +++ b/layouts/partials/script/single-script.html @@ -498,7 +498,9 @@ // ============================ mathjax ============================ document.querySelectorAll("mjx-container").forEach(function (x) { - x.parentElement.classList += 'has-jax' + if(!x.parentElement.classList.contains('has-jax')) { + x.parentElement.classList += 'has-jax'; + } }); // =================================================================