File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 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) {
219219 } ,
220220 ] ;
221221 for ( const { val, langVal, target } of valMatrix ) {
222- const pred = ( val : unknown ) => {
222+ const patch = ( val : unknown ) => {
223223 // some of the updates we do only append "enable" or "custom"
224224 // that means on the next run we would find these again, but as objects with
225225 // these properties causing us to destroy the config
@@ -229,15 +229,15 @@ export async function updateConfig(config: vscode.WorkspaceConfiguration) {
229229 ! (
230230 typeof val === "object" &&
231231 val !== null &&
232- ( val . hasOwnProperty ( "enable" ) || val . hasOwnProperty ( "custom" ) )
232+ ( oldKey === "completion.snippets" || ! val . hasOwnProperty ( "custom" ) )
233233 )
234234 ) ;
235235 } ;
236- if ( pred ( val ) ) {
236+ if ( patch ( val ) ) {
237237 await config . update ( newKey , val , target , false ) ;
238238 await config . update ( oldKey , undefined , target , false ) ;
239239 }
240- if ( pred ( langVal ) ) {
240+ if ( patch ( langVal ) ) {
241241 await config . update ( newKey , langVal , target , true ) ;
242242 await config . update ( oldKey , undefined , target , true ) ;
243243 }
You can’t perform that action at this time.
0 commit comments