File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/vs/workbench/contrib/preferences/browser Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -596,14 +596,18 @@ function isObjectSetting({
596
596
return false ;
597
597
}
598
598
599
- // object additional properties allow it to have any shape
600
- if ( objectAdditionalProperties === true || objectAdditionalProperties === undefined ) {
599
+ // objectAdditionalProperties allow the setting to have any shape,
600
+ // but if there's a pattern property that handles everything, then every
601
+ // property will match that patternProperty, so we don't need to look at
602
+ // the value of objectAdditionalProperties in that case.
603
+ if ( ( objectAdditionalProperties === true || objectAdditionalProperties === undefined )
604
+ && ! Object . keys ( objectPatternProperties ?? { } ) . includes ( '.*' ) ) {
601
605
return false ;
602
606
}
603
607
604
608
const schemas = [ ...Object . values ( objectProperties ?? { } ) , ...Object . values ( objectPatternProperties ?? { } ) ] ;
605
609
606
- if ( typeof objectAdditionalProperties === 'object' ) {
610
+ if ( objectAdditionalProperties && typeof objectAdditionalProperties === 'object' ) {
607
611
schemas . push ( objectAdditionalProperties ) ;
608
612
}
609
613
You can’t perform that action at this time.
0 commit comments