Skip to content

Commit

Permalink
By default use the system theme setting (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalexling committed Dec 27, 2020
1 parent 66a3cc2 commit 4e70707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const validThemeSetting = (theme) => {
*/
const loadThemeSetting = () => {
let str = localStorage.getItem('theme');
if (!str || !validThemeSetting(str)) str = 'light';
if (!str || !validThemeSetting(str)) str = 'system';
return str;
};

Expand All @@ -88,7 +88,7 @@ const loadTheme = () => {
* @param {string} setting - A theme setting
*/
const saveThemeSetting = setting => {
if (!validThemeSetting(setting)) setting = 'light';
if (!validThemeSetting(setting)) setting = 'system';
localStorage.setItem('theme', setting);
};

Expand Down

0 comments on commit 4e70707

Please sign in to comment.