Fix spellcheck settings from cookies might not a boolean in string type

This commit is contained in:
Wu Cheng-Han 2016-07-30 11:00:00 +08:00
parent b8ff9112ef
commit 246c9da574

View file

@ -508,7 +508,7 @@ function setSpellcheck() {
var cookieSpellcheck = Cookies.get('spellcheck');
if (cookieSpellcheck) {
var mode = null;
if (cookieSpellcheck === 'true') {
if (cookieSpellcheck === 'true' || cookieSpellcheck === true) {
mode = 'spell-checker';
} else {
mode = 'gfm';