mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-12-22 13:19:24 +01:00
actually allow setting settings to 0
This commit is contained in:
parent
2ea3617af3
commit
2ecd6662c9
1 changed files with 3 additions and 3 deletions
6
main.ts
6
main.ts
|
@ -193,7 +193,7 @@ class KeepSettingTab extends PluginSettingTab {
|
|||
t.inputEl.type = "number";
|
||||
t.setValue(String(this.plugin.settings.minimumWidth));
|
||||
t.onChange(async v => {
|
||||
this.plugin.settings.minimumWidth = Number(v) || defaultSettings.minimumWidth;
|
||||
this.plugin.settings.minimumWidth = v.length ? Number(v) : defaultSettings.minimumWidth;
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
@ -204,7 +204,7 @@ class KeepSettingTab extends PluginSettingTab {
|
|||
t.inputEl.type = "number";
|
||||
t.setValue(String(this.plugin.settings.padding));
|
||||
t.onChange(async v => {
|
||||
this.plugin.settings.padding = Number(v) || defaultSettings.padding;
|
||||
this.plugin.settings.padding = v.length ? Number(v) : defaultSettings.padding;
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
@ -216,7 +216,7 @@ class KeepSettingTab extends PluginSettingTab {
|
|||
t.inputEl.cols = 50;
|
||||
t.setValue(this.plugin.settings.css);
|
||||
t.onChange(async v => {
|
||||
this.plugin.settings.css = v || defaultSettings.css;
|
||||
this.plugin.settings.css = v.length ? v : defaultSettings.css;
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue