Skip to content

Commit 25446a0

Browse files
committed
fix(@angular/cli): avoid analytics cli object check if not present
The `cli` workspace configuration property was previously checked to determine if it was an object even if the property did not yet exist. (cherry picked from commit 776a6ec)
1 parent 893ee8f commit 25446a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/cli/models/analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export function setAnalyticsConfig(level: 'global' | 'local', value: string | bo
358358

359359
const cli = config.get(['cli']);
360360

361-
if (!json.isJsonObject(cli as json.JsonValue)) {
361+
if (cli !== undefined && !json.isJsonObject(cli as json.JsonValue)) {
362362
throw new Error(`Invalid config found at ${configPath}. CLI should be an object.`);
363363
}
364364

0 commit comments

Comments
 (0)