Skip to content

Commit 523bb28

Browse files
committed
fix: fixed useColorFallback setting
1 parent 5eff5f5 commit 523bb28

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/util/color.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export function getCategoryColorFromString(str: string): string {
108108
function fallbackColor(str: string): string {
109109
// Get fallback color
110110
// TODO: Fetch setting from somewhere better, where defaults are respected
111-
const useColorFallback = localStorage !== undefined ? localStorage.useColorFallback : true;
111+
const useColorFallback =
112+
localStorage !== undefined ? localStorage.useColorFallback === 'true' : true;
112113
if (useColorFallback) {
113114
return getColorFromString(str);
114115
} else {

src/views/settings/ColorSettings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
name: 'ColorSettings',
1414
data: () => {
1515
return {
16-
useColorFallback: localStorage.useColorFallback || true,
16+
useColorFallback: localStorage.useColorFallback === 'true',
1717
};
1818
},
1919
watch: {

0 commit comments

Comments
 (0)