@@ -11,7 +11,14 @@ export class RootNode extends NodeBase {
1111 private readonly _category : string ;
1212 private readonly isCsp : boolean ;
1313
14- public constructor ( label : string , fullName : string , contextValue : string , category : string , options : NodeOptions , isCsp = false ) {
14+ public constructor (
15+ label : string ,
16+ fullName : string ,
17+ contextValue : string ,
18+ category : string ,
19+ options : NodeOptions ,
20+ isCsp = false
21+ ) {
1522 super ( label , fullName , options ) ;
1623 this . contextValue = contextValue ;
1724 this . _category = category ;
@@ -31,7 +38,7 @@ export class RootNode extends NodeBase {
3138 }
3239
3340 public async getChildren ( element ) : Promise < NodeBase [ ] > {
34- const path = ( this instanceof PackageNode || this . isCsp ) ? this . fullName + "/" : "" ;
41+ const path = this instanceof PackageNode || this . isCsp ? this . fullName + "/" : "" ;
3542 return this . getItems ( path , this . _category ) ;
3643 }
3744
@@ -78,12 +85,12 @@ export class RootNode extends NodeBase {
7885 const content = data . result . content ;
7986 return content ;
8087 } )
81- . then ( data =>
82- data . map ( el => {
88+ . then ( ( data ) =>
89+ data . map ( ( el ) => {
8390 let fullName = el . Name ;
84- if ( this instanceof PackageNode ) {
91+ if ( this instanceof PackageNode ) {
8592 fullName = this . fullName + "." + el . Name ;
86- } else if ( this . isCsp ) {
93+ } else if ( this . isCsp ) {
8794 fullName = this . fullName + "/" + el . Name ;
8895 }
8996 return {
@@ -97,11 +104,11 @@ export class RootNode extends NodeBase {
97104 public getItems ( path : string , category : string ) : Promise < NodeBase [ ] > {
98105 return this . getList ( path , category , false ) . then ( ( data ) =>
99106 data
100- . filter ( el => {
101- if ( category === "OTHER" ) {
107+ . filter ( ( el ) => {
108+ if ( category === "OTHER" ) {
102109 return el . Type === "100" ;
103- } else if ( category === "CSP" ) {
104- return el . Type === "10" || el . Type === "5"
110+ } else if ( category === "CSP" ) {
111+ return el . Type === "10" || el . Type === "5" ;
105112 } else {
106113 return true ;
107114 }
0 commit comments