File tree Expand file tree Collapse file tree
extensions/css-language-features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,17 +76,13 @@ function getCustomDataPathsInAllWorkspaces(): string[] {
7676
7777function getCustomDataPathsFromAllExtensions ( ) : string [ ] {
7878 const dataPaths : string [ ] = [ ] ;
79-
8079 for ( const extension of extensions . all ) {
81- const contributes = extension . packageJSON && extension . packageJSON . contributes ;
82-
83- if ( contributes && contributes . css && contributes . css . customData && Array . isArray ( contributes . css . customData ) ) {
84- const relativePaths : string [ ] = contributes . css . customData ;
85- relativePaths . forEach ( rp => {
80+ const customData = extension . packageJSON ?. contributes ?. css ?. customData ;
81+ if ( Array . isArray ( customData ) ) {
82+ for ( const rp of customData ) {
8683 dataPaths . push ( joinPath ( extension . extensionUri , rp ) . toString ( ) ) ;
87- } ) ;
84+ }
8885 }
8986 }
90-
9187 return dataPaths ;
9288}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function parseCSSData(source: string): ICSSDataProvider {
2929 }
3030
3131 return newCSSDataProvider ( {
32- version : 1 ,
32+ version : rawData . version || 1 ,
3333 properties : rawData . properties || [ ] ,
3434 atDirectives : rawData . atDirectives || [ ] ,
3535 pseudoClasses : rawData . pseudoClasses || [ ] ,
You can’t perform that action at this time.
0 commit comments