Skip to content

Commit

Permalink
fix: fixed useColorFallback setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jun 11, 2021
1 parent 5eff5f5 commit 523bb28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/util/color.ts
Expand Up @@ -108,7 +108,8 @@ export function getCategoryColorFromString(str: string): string {
function fallbackColor(str: string): string {
// Get fallback color
// TODO: Fetch setting from somewhere better, where defaults are respected
const useColorFallback = localStorage !== undefined ? localStorage.useColorFallback : true;
const useColorFallback =
localStorage !== undefined ? localStorage.useColorFallback === 'true' : true;
if (useColorFallback) {
return getColorFromString(str);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/ColorSettings.vue
Expand Up @@ -13,7 +13,7 @@ export default {
name: 'ColorSettings',
data: () => {
return {
useColorFallback: localStorage.useColorFallback || true,
useColorFallback: localStorage.useColorFallback === 'true',
};
},
watch: {
Expand Down

1 comment on commit 523bb28

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are screenshots of this commit:

Screenshots using aw-server v0.10.0 (click to expand)

Screenshots using aw-server-rust master (click to expand)

Screenshots using aw-server-rust v0.10.0 (click to expand)

CML watermark

Please sign in to comment.