Skip to content

Commit

Permalink
fix(core): check nxjson cli exists before looking for keys (#19730)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini authored Oct 19, 2023
1 parent b9e671c commit 879436f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function update(tree: Tree) {

delete nxJson.cli?.['defaultCollection'];

if (Object.keys(nxJson.cli).length < 1) {
if (nxJson?.cli && Object.keys(nxJson.cli).length < 1) {
delete nxJson.cli;
}

Expand Down

0 comments on commit 879436f

Please sign in to comment.