Update packages/node_modules/@node-red/editor-client/src/js/ui/editor.js

Co-authored-by: Gauthier Dandele <92022724+GogoVega@users.noreply.github.com>
This commit is contained in:
Nick O'Leary 2024-12-10 15:42:59 +00:00 committed by GitHub
parent 7d284ce157
commit 11c4277466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -853,6 +853,25 @@ RED.editor = (function() {
} }
} }
} }
if (editing_node._def.credentials) {
for (const prop in editing_node._def.credentials) {
if (Object.prototype.hasOwnProperty.call(editing_node._def.credentials, prop)) {
if (oldCreds[prop] !== editing_node.credentials[prop]) {
if (editing_node.credentials[prop] === '__PWRD__') {
// The password may not exist in oldCreds
// The value '__PWRD__' means the password exists,
// so ignore this change
continue;
}
editState.changes.credentials = editState.changes.credentials || {};
editState.changes.credentials['has_' + prop] = oldCreds['has_' + prop];
editState.changes.credentials[prop] = oldCreds[prop];
editState.changed = true;
}
}
}
}
} }
} }