1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Handle package.json without dependencies section

This commit is contained in:
Nick O'Leary 2021-04-12 10:34:43 +01:00
parent 13406e76de
commit 51aaf1b150
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -472,7 +472,7 @@ function getPackageList() {
try {
var userPackage = path.join(settings.userDir,"package.json");
var pkg = JSON.parse(fs.readFileSync(userPackage,"utf-8"));
return pkg.dependencies;
return pkg.dependencies || {};
} catch(err) {
log.error(err);
}