Skip to content

Commit

Permalink
fix(@schematics/angular): undefined is used as newProjectRoot when no…
Browse files Browse the repository at this point in the history
…ne is set

Fixes #13703
  • Loading branch information
ahasall authored and kyliau committed Feb 21, 2019
1 parent 9e6e47e commit 7b31c86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index.ts
Expand Up @@ -326,7 +326,7 @@ export default function (options: ApplicationOptions): Rule {
};

const workspace = getWorkspace(host);
let newProjectRoot = workspace.newProjectRoot;
let newProjectRoot = workspace.newProjectRoot || 'projects';
let appDir = `${newProjectRoot}/${options.name}`;
let sourceRoot = `${appDir}/src`;
let sourceDir = `${sourceRoot}/app`;
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/library/index.ts
Expand Up @@ -193,7 +193,7 @@ export default function (options: LibraryOptions): Rule {
}

const workspace = getWorkspace(host);
const newProjectRoot = workspace.newProjectRoot;
const newProjectRoot = workspace.newProjectRoot || 'projects';

const scopeFolder = scopeName ? strings.dasherize(scopeName) + '/' : '';
const folderName = `${scopeFolder}${strings.dasherize(options.name)}`;
Expand Down

0 comments on commit 7b31c86

Please sign in to comment.