From 75280d3072b230475aa84e90eb687635353c7127 Mon Sep 17 00:00:00 2001 From: Meutel Date: Sat, 22 Dec 2018 22:49:03 +0100 Subject: [PATCH] fix --- assets/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/main.js b/assets/js/main.js index 9c92789..620db5d 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -21,7 +21,7 @@ jQuery(function($) { _Blog.toggleTheme = function() { const currentTheme = window.localStorage && window.localStorage.getItem('theme') - const isDark = currentTheme === undefined || currentTheme === 'dark' + const isDark = currentTheme === null || currentTheme === 'dark' $('body').toggleClass('dark-theme', isDark) $('.theme-switch').on('click', () => { $('body').toggleClass('dark-theme')