Skip to content

Commit

Permalink
fix(wizard): builtin enable setup fails on new installs (#200)
Browse files Browse the repository at this point in the history
Co-authored-by: lihbr <lihbr@users.noreply.github.com>
  • Loading branch information
lihbr and lihbr committed Apr 24, 2023
1 parent 2cbb52e commit 9551479
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools-wizard/src/global.ts
Expand Up @@ -72,12 +72,12 @@ export async function disable(cwd: string, args: string[]) {
}

function markDisable(rc: RC, path: string) {
if (rc.devtoolsGlobal?.projects?.includes(path)) {
if (rc?.devtoolsGlobal?.projects?.includes(path)) {
rc.devtoolsGlobal.projects = rc.devtoolsGlobal.projects.filter((p: string) => p !== path)
return true
}
// remove module if no projects
if (!rc.devtoolsGlobal.projects?.length)
if (!rc?.devtoolsGlobal?.projects?.length)
removeModule(rc)
return false
}
Expand Down

0 comments on commit 9551479

Please sign in to comment.