@@ -72,7 +72,7 @@ export class TestingArchitectHost implements ArchitectHost {
7272 const name = targetStringFromTarget ( target ) ;
7373 const maybeTarget = this . _targetMap . get ( name ) ;
7474 if ( ! maybeTarget ) {
75- return this . _backendHost && this . _backendHost . getBuilderNameForTarget ( target ) ;
75+ return this . _backendHost ?. getBuilderNameForTarget ( target ) ?? null ;
7676 }
7777
7878 return maybeTarget . builderName ;
@@ -87,8 +87,7 @@ export class TestingArchitectHost implements ArchitectHost {
8787 */
8888 async resolveBuilder ( builderName : string ) : Promise < BuilderInfo | null > {
8989 return (
90- this . _builderMap . get ( builderName ) ||
91- ( this . _backendHost && this . _backendHost . resolveBuilder ( builderName ) )
90+ this . _builderMap . get ( builderName ) || ( this . _backendHost ?. resolveBuilder ( builderName ) ?? null )
9291 ) ;
9392 }
9493
@@ -103,20 +102,19 @@ export class TestingArchitectHost implements ArchitectHost {
103102 const name = targetStringFromTarget ( target ) ;
104103 const maybeTarget = this . _targetMap . get ( name ) ;
105104 if ( ! maybeTarget ) {
106- return this . _backendHost && this . _backendHost . getOptionsForTarget ( target ) ;
105+ return this . _backendHost ?. getOptionsForTarget ( target ) ?? null ;
107106 }
108107
109108 return maybeTarget . options ;
110109 }
111110
112111 async getProjectMetadata ( target : Target | string ) : Promise < json . JsonObject | null > {
113- return this . _backendHost && this . _backendHost . getProjectMetadata ( target as string ) ;
112+ return this . _backendHost ?. getProjectMetadata ( target as string ) ?? null ;
114113 }
115114
116115 async loadBuilder ( info : BuilderInfo ) : Promise < Builder | null > {
117116 return (
118- this . _builderImportMap . get ( info . builderName ) ||
119- ( this . _backendHost && this . _backendHost . loadBuilder ( info ) )
117+ this . _builderImportMap . get ( info . builderName ) || ( this . _backendHost ?. loadBuilder ( info ) ?? null )
120118 ) ;
121119 }
122120}
0 commit comments