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

Default flowFilePretty to true if projects enabled

This commit is contained in:
Nick O'Leary 2020-09-23 10:57:58 +01:00
parent 103e212aee
commit b8b0247717
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -563,7 +563,8 @@ function saveFlows(flows) {
var flowData;
if (settings.flowFilePretty) {
if (settings.flowFilePretty || (activeProject && settings.flowFilePretty !== false) ) {
// Pretty format if option enabled, or using Projects and not explicitly disabled
flowData = JSON.stringify(flows,null,4);
} else {
flowData = JSON.stringify(flows);
@ -581,7 +582,8 @@ function saveCredentials(credentials) {
}
var credentialData;
if (settings.flowFilePretty) {
if (settings.flowFilePretty || (activeProject && settings.flowFilePretty !== false) ) {
// Pretty format if option enabled, or using Projects and not explicitly disabled
credentialData = JSON.stringify(credentials,null,4);
} else {
credentialData = JSON.stringify(credentials);