From 9159bc3da6e7ab3ebb66c55dac2daf39b3921505 Mon Sep 17 00:00:00 2001 From: Rohan Deb Sarkar Date: Wed, 8 Jun 2022 10:41:27 +0530 Subject: [PATCH] Fix theme (#697) * fix theme * fix theme Co-authored-by: rohandebsarkar --- assets/js/theme.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index 169ea21d41bd..f6c9cdf715a4 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -50,12 +50,13 @@ let transTheme = () => { let initTheme = (theme) => { - if (theme == null) { + if (theme == null || theme == 'null') { const userPref = window.matchMedia; if (userPref && userPref('(prefers-color-scheme: dark)').matches) { theme = 'dark'; } } + setTheme(theme); }