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({
596596 return false ;
597597 }
598598
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 ( '.*' ) ) {
601605 return false ;
602606 }
603607
604608 const schemas = [ ...Object . values ( objectProperties ?? { } ) , ...Object . values ( objectPatternProperties ?? { } ) ] ;
605609
606- if ( typeof objectAdditionalProperties === 'object' ) {
610+ if ( objectAdditionalProperties && typeof objectAdditionalProperties === 'object' ) {
607611 schemas . push ( objectAdditionalProperties ) ;
608612 }
609613
You can’t perform that action at this time.
0 commit comments