From 25ca83a8a76fe0eaf73c0db24fd950b33fd16063 Mon Sep 17 00:00:00 2001 From: Peter Batory-Bernardin Date: Wed, 12 Jul 2023 17:38:04 +0100 Subject: [PATCH] fix(cli): make migrate not error if there are no dependencies (#6707) Co-authored-by: jcesarmobile --- cli/src/tasks/migrate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/tasks/migrate.ts b/cli/src/tasks/migrate.ts index 4fd82d5f55..b231ac32a2 100644 --- a/cli/src/tasks/migrate.ts +++ b/cli/src/tasks/migrate.ts @@ -414,7 +414,7 @@ async function installLatestLibs( pkgJson['devDependencies'][devDepKey] = pluginVersion; } } - for (const depKey of Object.keys(pkgJson['dependencies'])) { + for (const depKey of Object.keys(pkgJson['dependencies'] || {})) { if (libs.includes(depKey)) { pkgJson['dependencies'][depKey] = coreVersion; } else if (plugins.includes(depKey)) {