@node-red/runtime 3.1.4 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -384,7 +384,8 @@ var api = module.exports = {
384
384
  }
385
385
  }
386
386
  } else if (nodeType === "global-config") {
387
- const existingCredentialKeys = Object.keys(savedCredentials?.map || [])
387
+ savedCredentials.map = savedCredentials.map || {}
388
+ const existingCredentialKeys = Object.keys(savedCredentials.map)
388
389
  const newCredentialKeys = Object.keys(newCreds?.map || [])
389
390
  existingCredentialKeys.forEach(key => {
390
391
  if (!newCreds.map?.[key]) {
@@ -396,7 +397,7 @@ var api = module.exports = {
396
397
  })
397
398
  newCredentialKeys.forEach(key => {
398
399
  if (!/^has_/.test(key)) {
399
- if (!savedCredentials.map?.[key] || newCreds.map[key] !== '__PWRD__') {
400
+ if (!savedCredentials.map[key] || newCreds.map[key] !== '__PWRD__') {
400
401
  // This key either doesn't exist in current saved, or the
401
402
  // value has been changed
402
403
  savedCredentials.map[key] = newCreds.map[key]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/runtime",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./lib/index.js",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "dependencies": {
19
- "@node-red/registry": "3.1.4",
20
- "@node-red/util": "3.1.4",
19
+ "@node-red/registry": "3.1.5",
20
+ "@node-red/util": "3.1.5",
21
21
  "async-mutex": "0.4.0",
22
22
  "clone": "2.1.2",
23
23
  "express": "4.18.2",