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:
parent
13406e76de
commit
51aaf1b150
@ -472,7 +472,7 @@ function getPackageList() {
|
|||||||
try {
|
try {
|
||||||
var userPackage = path.join(settings.userDir,"package.json");
|
var userPackage = path.join(settings.userDir,"package.json");
|
||||||
var pkg = JSON.parse(fs.readFileSync(userPackage,"utf-8"));
|
var pkg = JSON.parse(fs.readFileSync(userPackage,"utf-8"));
|
||||||
return pkg.dependencies;
|
return pkg.dependencies || {};
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
log.error(err);
|
log.error(err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user