File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ export async function updateConfig(config: vscode.WorkspaceConfiguration) {
219
219
} ,
220
220
] ;
221
221
for ( const { val, langVal, target } of valMatrix ) {
222
- const pred = ( val : unknown ) => {
222
+ const patch = ( val : unknown ) => {
223
223
// some of the updates we do only append "enable" or "custom"
224
224
// that means on the next run we would find these again, but as objects with
225
225
// these properties causing us to destroy the config
@@ -229,15 +229,15 @@ export async function updateConfig(config: vscode.WorkspaceConfiguration) {
229
229
! (
230
230
typeof val === "object" &&
231
231
val !== null &&
232
- ( val . hasOwnProperty ( "enable" ) || val . hasOwnProperty ( "custom" ) )
232
+ ( oldKey === "completion.snippets" || ! val . hasOwnProperty ( "custom" ) )
233
233
)
234
234
) ;
235
235
} ;
236
- if ( pred ( val ) ) {
236
+ if ( patch ( val ) ) {
237
237
await config . update ( newKey , val , target , false ) ;
238
238
await config . update ( oldKey , undefined , target , false ) ;
239
239
}
240
- if ( pred ( langVal ) ) {
240
+ if ( patch ( langVal ) ) {
241
241
await config . update ( newKey , langVal , target , true ) ;
242
242
await config . update ( oldKey , undefined , target , true ) ;
243
243
}
You can’t perform that action at this time.
0 commit comments