mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
🐛 Fix for same name rename (#1317)
If you rename to the same name, it just gets removed. This should not be the case.
This commit is contained in:
parent
b389ef116d
commit
2fed026523
|
@ -96,8 +96,8 @@ export class RenameKeys implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
renameKeys.forEach((renameKey) => {
|
renameKeys.forEach((renameKey) => {
|
||||||
if (renameKey.currentKey === '' || renameKey.newKey === '') {
|
if (renameKey.currentKey === '' || renameKey.newKey === '' || renameKey.currentKey === renameKey.newKey) {
|
||||||
// Ignore all which do not have all the values set
|
// Ignore all which do not have all the values set or if the new key is equal to the current key
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
value = get(item.json, renameKey.currentKey as string);
|
value = get(item.json, renameKey.currentKey as string);
|
||||||
|
|
Loading…
Reference in a new issue