From df6f292151d63d993b61be7e440d634912633f68 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Tue, 6 Dec 2016 21:30:13 +0800 Subject: [PATCH] fix issue 10 --- TODO.md | 1 + lib/mcommon.js | 6 +++++- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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" }