From b8b024771719ba98c7bcc141a8d1487cb500228e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 23 Sep 2020 10:57:58 +0100 Subject: [PATCH] Default flowFilePretty to true if projects enabled --- .../runtime/lib/storage/localfilesystem/projects/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js index fa4c294e7..22b0aa36a 100644 --- a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js +++ b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js @@ -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);