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

Fix handling of default workflow mode when projects not active

This commit is contained in:
Nick O'Leary 2021-01-08 15:05:34 +00:00
parent 0f7d185a61
commit 5489bd37c9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -580,12 +580,14 @@ function saveFlows(flows, user) {
}
return util.writeFile(flowsFullPath, flowData, flowsFileBackup).then(() => {
var gitSettings = getUserGitSettings(user) || {};
if (activeProject) {
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
if (activeProject && workflowMode === 'auto') {
if (workflowMode === 'auto') {
return activeProject.stageFile([flowsFullPath, credentialsFile]).then(() => {
return activeProject.commit(user,{message:"Update flow files"})
})
}
}
});
}