diff --git a/src/commands/npm.ts b/src/commands/npm.ts index 2ed756e..e1a04b8 100644 --- a/src/commands/npm.ts +++ b/src/commands/npm.ts @@ -34,7 +34,7 @@ export default class NPM extends Command { license = data.license; } let dependencies: string = 'None'; - if (version !== 'Unknown' && data.versions[version].dependencies) { + if (version !== 'Unknown' && data.versions[version].hasOwnProperty('dependencies') && Object.keys(data.versions[version].dependencies).length > 0) { dependencies = Object.keys(data.versions[version].dependencies).join(', '); } const name: string = data.name || 'None';