File tree Expand file tree Collapse file tree
src/vs/platform/extensions/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,14 +11,12 @@ import product from 'vs/platform/product/node/product';
1111
1212export function isUIExtension ( manifest : IExtensionManifest , uiContributions : string [ ] , configurationService : IConfigurationService ) : boolean {
1313 const extensionId = getGalleryExtensionId ( manifest . publisher , manifest . name ) ;
14- const configuredUIExtensions = configurationService . getValue < string [ ] > ( '_workbench.uiExtensions' ) || [ ] ;
15- if ( configuredUIExtensions . length ) {
16- if ( configuredUIExtensions . indexOf ( extensionId ) !== - 1 ) {
17- return true ;
18- }
19- if ( configuredUIExtensions . indexOf ( `-${ extensionId } ` ) !== - 1 ) {
20- return false ;
21- }
14+ const configuredUIExtensions = new Set ( configurationService . getValue < string [ ] > ( '_workbench.uiExtensions' ) || [ ] ) ;
15+ if ( configuredUIExtensions . has ( extensionId ) ) {
16+ return true ;
17+ }
18+ if ( configuredUIExtensions . has ( `-${ extensionId } ` ) ) {
19+ return false ;
2220 }
2321 switch ( manifest . extensionKind ) {
2422 case 'ui' : return true ;
You can’t perform that action at this time.
0 commit comments