From c9d39fff4c993aa5ec1119fab0b1044ae460dfa7 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 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';