diff --git a/TODO.md b/TODO.md index cebd0dc..8c729ea 100644 --- a/TODO.md +++ b/TODO.md @@ -8,3 +8,4 @@ ##BUG 1. √ ~~hexo g will not work when the config file with no blogs block.~~ 2. √ ~~if blog content has special character, it will crush.~~ +3. √ ~~if no toc div the decrypt will throw a exception.~~ diff --git a/lib/mcommon.js b/lib/mcommon.js index 82ad7a2..02fff33 100644 --- a/lib/mcommon.js +++ b/lib/mcommon.js @@ -14,10 +14,14 @@ function decryptAES() { document.getElementById("encrypt-message").style.display = "none"; document.getElementById("security").style.display = "none"; - document.getElementById("toc-div").style.display = "inline"; + + if (document.getElementById("toc-div")) { + document.getElementById("toc-div").style.display = "inline"; + } } } catch (e) { alert("密码错误!!"); + console.log(e); } } diff --git a/package.json b/package.json index cf02f43..6fe4219 100644 --- a/package.json +++ b/package.json @@ -33,5 +33,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "1.1.8" + "version": "1.1.9" }