diff --git a/lib/common-utils.cjs b/lib/common-utils.cjs index d0a5b9d..503d53c 100644 --- a/lib/common-utils.cjs +++ b/lib/common-utils.cjs @@ -24,8 +24,8 @@ function getPackageJson(cwd = process.cwd()) { function getThemePackage() { const packageJson = getPackageJson(); return [ - ...Object.keys(packageJson.dependencies), - ...Object.keys(packageJson.devDependencies), + ...Object.keys(packageJson.dependencies ?? {}), + ...Object.keys(packageJson.devDependencies ?? {}), ].find((name) => name.startsWith('auto-reveal-theme-')); }