Skip to content

Commit

Permalink
Fix issue with class toggle default
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeyers committed Aug 8, 2021
1 parent 38c6140 commit 62853c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-style-settings",
"name": "Style Settings",
"version": "0.3.2",
"version": "0.3.3",
"minAppVersion": "0.11.5",
"description": "Offers controls for adjusting theme, plugin, and snippet CSS variables.",
"author": "mgmeyers",
Expand Down
2 changes: 1 addition & 1 deletion src/settingHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function createClassToggle(opts: {
const value = settingsManager.getSetting(sectionId, config.id);

toggle
.setValue((value as boolean) || !!config.default)
.setValue(value !== undefined ? !!value : !!config.default)
.onChange((value) => {
settingsManager.setSetting(sectionId, config.id, value);

Expand Down

0 comments on commit 62853c9

Please sign in to comment.