Fix npm command dependencies variable
parent
08cf69173e
commit
c9d39fff4c
|
@ -34,7 +34,7 @@ export default class NPM extends Command {
|
||||||
license = data.license;
|
license = data.license;
|
||||||
}
|
}
|
||||||
let dependencies: string = 'None';
|
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(', ');
|
dependencies = Object.keys(data.versions[version].dependencies).join(', ');
|
||||||
}
|
}
|
||||||
const name: string = data.name || 'None';
|
const name: string = data.name || 'None';
|
||||||
|
|
Loading…
Reference in New Issue