File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,12 @@ export default class BetterWordCountSettingsTab extends PluginSettingTab {
5757 . setPlaceholder ( "300" )
5858 . setValue ( String ( this . plugin . settings . pageWords ) )
5959 . onChange ( async ( value : string ) => {
60- if ( ! isNaN ( Number ( value ) ) ) {
60+ if ( value ) {
6161 this . plugin . settings . pageWords = parseInt ( value ) ;
62- this . plugin . saveSettings ( ) ;
6362 } else {
6463 this . plugin . settings . pageWords = 300 ;
65- this . plugin . saveSettings ( ) ;
6664 }
65+ await this . plugin . saveSettings ( ) ;
6766 } ) ;
6867 } ) ;
6968
@@ -79,11 +78,10 @@ export default class BetterWordCountSettingsTab extends PluginSettingTab {
7978 . onChange ( async ( value : string ) => {
8079 if ( value ) {
8180 this . plugin . settings . statsPath = value ;
82- await this . plugin . saveSettings ( ) ;
8381 } else {
8482 this . plugin . settings . statsPath = ".obsidian/vault-stats.json"
85- await this . plugin . saveSettings ( ) ;
8683 }
84+ await this . plugin . saveSettings ( ) ;
8785 } ) ;
8886 } ) ;
8987
You can’t perform that action at this time.
0 commit comments