mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into fips
This commit is contained in:
@@ -212,6 +212,7 @@ class Subflow extends Flow {
|
||||
var subflowInstanceConfig = {
|
||||
id: this.subflowInstance.id,
|
||||
type: this.subflowInstance.type,
|
||||
g: this.subflowInstance.g,
|
||||
z: this.subflowInstance.z,
|
||||
name: this.subflowInstance.name,
|
||||
wires: [],
|
||||
|
@@ -374,7 +374,12 @@ async function start(type,diff,muteLog,isDeploy) {
|
||||
// A modified-type deploy means restarting things that have changed
|
||||
|
||||
// Update the global flow
|
||||
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
|
||||
if (activeFlows['global']) {
|
||||
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
|
||||
} else {
|
||||
log.debug("red/nodes/flows.start : starting flow : global");
|
||||
activeFlows['global'] = Flow.create(flowAPI,activeFlowConfig);
|
||||
}
|
||||
for (id in activeFlowConfig.flows) {
|
||||
if (activeFlowConfig.flows.hasOwnProperty(id)) {
|
||||
if (!activeFlowConfig.flows[id].disabled) {
|
||||
|
@@ -384,7 +384,8 @@ var api = module.exports = {
|
||||
}
|
||||
}
|
||||
} else if (nodeType === "global-config") {
|
||||
const existingCredentialKeys = Object.keys(savedCredentials?.map || [])
|
||||
savedCredentials.map = savedCredentials.map || {}
|
||||
const existingCredentialKeys = Object.keys(savedCredentials.map)
|
||||
const newCredentialKeys = Object.keys(newCreds?.map || [])
|
||||
existingCredentialKeys.forEach(key => {
|
||||
if (!newCreds.map?.[key]) {
|
||||
@@ -396,7 +397,7 @@ var api = module.exports = {
|
||||
})
|
||||
newCredentialKeys.forEach(key => {
|
||||
if (!/^has_/.test(key)) {
|
||||
if (!savedCredentials.map?.[key] || newCreds.map[key] !== '__PWRD__') {
|
||||
if (!savedCredentials.map[key] || newCreds.map[key] !== '__PWRD__') {
|
||||
// This key either doesn't exist in current saved, or the
|
||||
// value has been changed
|
||||
savedCredentials.map[key] = newCreds.map[key]
|
||||
|
Reference in New Issue
Block a user