Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit 832616c

Browse files
committed
chore: swap falsy checks for length checks
1 parent e22b2de commit 832616c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cli/src/actions/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ async function loadPluginModule(provider: string, basePath: string) {
320320

321321
async function checkForMismatchedPackages(projectPath: string) {
322322
const packages = await getZenStackPackages(projectPath);
323-
if (!packages) {
323+
if (!packages.length) {
324324
return false;
325325
}
326326

packages/cli/src/actions/info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getZenStackPackages } from './action-utils';
66
*/
77
export async function run(projectPath: string) {
88
const packages = await getZenStackPackages(projectPath);
9-
if (!packages) {
9+
if (!packages.length) {
1010
console.error('Unable to locate package.json. Are you in a valid project directory?');
1111
return;
1212
}

0 commit comments

Comments
 (0)