File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/vs/workbench/api/common Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,13 @@ export class ExtHostConfigProvider {
191
191
} else {
192
192
let clonedConfig : any | undefined = undefined ;
193
193
const cloneOnWriteProxy = ( target : any , accessor : string ) : any => {
194
- let clonedTarget : any | undefined = undefined ;
195
- const cloneTarget = ( ) => {
196
- clonedConfig = clonedConfig ? clonedConfig : deepClone ( config ) ;
197
- clonedTarget = clonedTarget ? clonedTarget : lookUp ( clonedConfig , accessor ) ;
198
- } ;
199
- return isObject ( target ) ?
200
- new Proxy ( target , {
194
+ if ( isObject ( target ) ) {
195
+ let clonedTarget : any | undefined = undefined ;
196
+ const cloneTarget = ( ) => {
197
+ clonedConfig = clonedConfig ? clonedConfig : deepClone ( config ) ;
198
+ clonedTarget = clonedTarget ? clonedTarget : lookUp ( clonedConfig , accessor ) ;
199
+ } ;
200
+ return new Proxy ( target , {
201
201
get : ( target : any , property : PropertyKey ) => {
202
202
if ( typeof property === 'string' && property . toLowerCase ( ) === 'tojson' ) {
203
203
cloneTarget ( ) ;
@@ -234,7 +234,9 @@ export class ExtHostConfigProvider {
234
234
}
235
235
return true ;
236
236
}
237
- } ) : target ;
237
+ } ) ;
238
+ }
239
+ return target ;
238
240
} ;
239
241
result = cloneOnWriteProxy ( result , key ) ;
240
242
}
You can’t perform that action at this time.
0 commit comments