mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle missing projects runtime setting
This commit is contained in:
parent
f0193b0f67
commit
dec82589d1
@ -395,7 +395,7 @@ function createProject(user, metadata) {
|
|||||||
}
|
}
|
||||||
function setActiveProject(user, projectName) {
|
function setActiveProject(user, projectName) {
|
||||||
return loadProject(projectName).then(function(project) {
|
return loadProject(projectName).then(function(project) {
|
||||||
var globalProjectSettings = settings.get("projects");
|
var globalProjectSettings = settings.get("projects")||{};
|
||||||
globalProjectSettings.activeProject = project.name;
|
globalProjectSettings.activeProject = project.name;
|
||||||
return settings.set("projects",globalProjectSettings).then(function() {
|
return settings.set("projects",globalProjectSettings).then(function() {
|
||||||
log.info(log._("storage.localfilesystem.projects.changing-project",{project:(activeProject&&activeProject.name)||"none"}));
|
log.info(log._("storage.localfilesystem.projects.changing-project",{project:(activeProject&&activeProject.name)||"none"}));
|
||||||
|
Loading…
Reference in New Issue
Block a user