Skip to content

Commit

Permalink
fix(wizard): update disable logic
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 29, 2023
1 parent d63cf58 commit 95353b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/devtools-wizard/src/builtin.ts
Expand Up @@ -42,9 +42,11 @@ async function toggleConfig(cwd: string, value?: boolean) {
? mod.exports.default.$args[0]
: mod.exports.default

config.devtools ||= {}
if (typeof config.devtools === 'object')
config.devtools.enabled = true
if (config.devtools || value) {
config.devtools ||= {}
if (typeof config.devtools === 'object')
config.devtools.enabled = value
}

const generated = mod.generate().code

Expand Down

0 comments on commit 95353b6

Please sign in to comment.