From 8cfc5c3194e31d3f39df78a8c11dfc4a46bac37e Mon Sep 17 00:00:00 2001 From: Jerry Orta Date: Sun, 6 May 2018 12:16:02 -0500 Subject: [PATCH] fix: add custom theme using string ref in angular.json Fixes #11188 --- src/lib/schematics/utils/ast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/schematics/utils/ast.ts b/src/lib/schematics/utils/ast.ts index 59def1fb3571..3eb9e8cf1cc0 100644 --- a/src/lib/schematics/utils/ast.ts +++ b/src/lib/schematics/utils/ast.ts @@ -67,7 +67,7 @@ export function getStylesPath(host: Tree, project: Project): string { const buildTarget = project.architect['build']; if (buildTarget.options && buildTarget.options.styles && buildTarget.options.styles.length) { - const styles = buildTarget.options.styles.map(s => s.input); + const styles = buildTarget.options.styles.map(s => typeof s === 'string' ? s : s.input); // First, see if any of the assets is called "styles.(le|sc|c)ss", which is the default // "main" style sheet.