From 33b5df43a5c81baa29a0d1ce2161eb32d43f27c3 Mon Sep 17 00:00:00 2001 From: Jerry Orta Date: Tue, 8 May 2018 11:55:44 -0500 Subject: [PATCH] fix: add custom theme using string ref in angular.json (#11189) 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.