From 668064fbfdcec8aacf87612ad077f674b2022584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DedShot=E2=84=A2=239195?= Date: Fri, 1 May 2020 15:16:33 -0400 Subject: [PATCH] Fix npm command dependencies variable --- src/commands/npm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/npm.ts b/src/commands/npm.ts index fae9cff..031d21b 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';