From 7250c9858a0570cfd50c11576211f96344595a18 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Sat, 16 Nov 2019 16:28:12 +0100 Subject: [PATCH] Fix a small issue with the toggle dark mode button --- package.json | 2 +- src/js/app.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 71d4e0e..7158aab 100644 --- a/package.json +++ b/package.json @@ -54,5 +54,5 @@ "desktop": "assets/screenshot-desktop.jpg", "mobile": "assets/screenshot-mobile.jpg" }, - "version": "0.6.0" + "version": "0.6.1" } diff --git a/src/js/app.js b/src/js/app.js index 4553306..812825c 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -193,10 +193,10 @@ $(document).ready(() => { if (currentSavedTheme === 'dark') { $toggleDarkMode.attr('checked', true) } - } - - if (isDarkMode()) { - $toggleDarkMode.attr('checked', true) + } else { + if (isDarkMode()) { + $toggleDarkMode.attr('checked', true) + } } var headerElement = document.querySelector('.js-header')