From 735b9c58445a6991bfba63da5edca9e05561117f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 26 Jul 2021 14:50:00 +0100 Subject: [PATCH] Handle just-copied-but-not-deployed node with credentials in editor Fixes #3090 --- .../node_modules/@node-red/editor-client/src/js/ui/editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index 2aea8adac..9cac57872 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -407,8 +407,10 @@ RED.editor = (function() { */ function updateNodeCredentials(node, credDefinition, prefix) { var changed = false; - if(!node.credentials) { + if (!node.credentials) { node.credentials = {_:{}}; + } else if (!node.credentials._) { + node.credentials._ = {}; } for (var cred in credDefinition) {