Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(convertNode) Do not create the credentials object if there is nothing to export #4544

Merged
merged 1 commit into from Jan 26, 2024

Conversation

GogoVega
Copy link
Contributor

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

When convertNode receives a node with the credentials object, a loop checks for each credential whether it should be exported or not. If no credential is exported the function returns an empty object.

// the node returned
{
  id: "some-id",
  type: "some-type",
  credentials: {}, // <- empty creds object
  ...
}

Which is likely to overwrite unmodified credentials - the object should not be returned.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@knolleary knolleary merged commit 9bd7131 into node-red:master Jan 26, 2024
4 checks passed
@GogoVega GogoVega deleted the fix-creds-convert-node branch January 27, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants