Skip to content

Commit

Permalink
fix(cli): prevent error on migrate when devDependencies is missing (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zookatron committed Aug 17, 2022
1 parent 0ad41d0 commit 474ad1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/tasks/migrate.ts
Expand Up @@ -339,7 +339,7 @@ async function installLatestNPMLibs(runInstall: boolean, config: Config) {
}
const pkgJson: any = JSON.parse(pkgJsonFile);

for (const devDepKey of Object.keys(pkgJson['devDependencies'])) {
for (const devDepKey of Object.keys(pkgJson['devDependencies'] || {})) {
if (libs.includes(devDepKey)) {
pkgJson['devDependencies'][devDepKey] = coreVersion;
} else if (plugins.includes(devDepKey)) {
Expand Down

0 comments on commit 474ad1f

Please sign in to comment.