File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -44,17 +44,16 @@ public async Task InitializeAsync()
4444 // we need to convert it to the correct type
4545 foreach ( var ( key , value ) in Settings )
4646 {
47- if ( value is JsonElement jsonElement )
47+ if ( value is not JsonElement jsonElement ) continue ;
48+
49+ Settings [ key ] = jsonElement . ValueKind switch
4850 {
49- Settings [ key ] = jsonElement . ValueKind switch
50- {
51- JsonValueKind . String => jsonElement . GetString ( ) ?? value ,
52- JsonValueKind . True => jsonElement . GetBoolean ( ) ,
53- JsonValueKind . False => jsonElement . GetBoolean ( ) ,
54- JsonValueKind . Null => null ,
55- _ => value
56- } ;
57- }
51+ JsonValueKind . String => jsonElement . GetString ( ) ?? value ,
52+ JsonValueKind . True => jsonElement . GetBoolean ( ) ,
53+ JsonValueKind . False => jsonElement . GetBoolean ( ) ,
54+ JsonValueKind . Null => null ,
55+ _ => value
56+ } ;
5857 }
5958 }
6059
You can’t perform that action at this time.
0 commit comments