File tree 1 file changed +2
-1
lines changed
src/vs/workbench/services/search/common 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,8 @@ export class QueryBuilder {
239
239
240
240
private commonQuery ( folderResources : ( IWorkspaceFolderData | URI ) [ ] = [ ] , options : ICommonQueryBuilderOptions = { } ) : ICommonQueryProps < uri > {
241
241
242
- const excludePatterns = Array . isArray ( options . excludePattern ) ? options . excludePattern . map ( p => p . pattern ) . flat ( ) : options . excludePattern ;
242
+ let excludePatterns : string | string [ ] | undefined = Array . isArray ( options . excludePattern ) ? options . excludePattern . map ( p => p . pattern ) . flat ( ) : options . excludePattern ;
243
+ excludePatterns = excludePatterns ?. length === 1 ? excludePatterns [ 0 ] : excludePatterns ;
243
244
const includeSearchPathsInfo : ISearchPathsInfo = this . handleIncludeExclude ( options . includePattern , options . expandPatterns ) ;
244
245
const excludeSearchPathsInfo : ISearchPathsInfo = this . handleIncludeExclude ( excludePatterns , options . expandPatterns ) ;
245
246
You can’t perform that action at this time.
0 commit comments