@@ -63,6 +63,7 @@ export class Workspace {
63
63
64
64
constructor ( private _root : Path , private _host : virtualFs . Host < { } > ) {
65
65
this . _registry = new schema . CoreSchemaRegistry ( ) ;
66
+ this . _registry . addPostTransform ( schema . transforms . addUndefinedDefaults ) ;
66
67
}
67
68
68
69
loadWorkspaceFromJson ( json : { } ) {
@@ -232,7 +233,9 @@ export class Workspace {
232
233
let workspaceTool = this . _workspace [ toolName ] ;
233
234
234
235
// Try falling back to 'architect' if 'targets' is not there or is empty.
235
- if ( ( ! workspaceTool || Object . keys ( workspaceTool ) . length === 0 ) && toolName === 'targets' ) {
236
+ if ( ( ! workspaceTool || Object . keys ( workspaceTool ) . length === 0 )
237
+ && toolName === 'targets'
238
+ && this . _workspace [ 'architect' ] ) {
236
239
workspaceTool = this . _workspace [ 'architect' ] ;
237
240
}
238
241
@@ -257,11 +260,12 @@ export class Workspace {
257
260
let projectTool = workspaceProject [ toolName ] ;
258
261
259
262
// Try falling back to 'architect' if 'targets' is not there or is empty.
260
- if ( ( ! projectTool || Object . keys ( projectTool ) . length === 0 ) && toolName === 'targets' ) {
263
+ if ( ( ! projectTool || Object . keys ( projectTool ) . length === 0 )
264
+ && workspaceProject [ 'architect' ]
265
+ && toolName === 'targets' ) {
261
266
projectTool = workspaceProject [ 'architect' ] ;
262
267
}
263
268
264
-
265
269
if ( ! projectTool ) {
266
270
throw new ProjectToolNotFoundException ( toolName ) ;
267
271
}
0 commit comments