Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

fix(hubspot): don't modify the options object when getting destination options #3011

Merged
merged 2 commits into from Feb 28, 2022

Conversation

pedroslopez
Copy link
Member

@pedroslopez pedroslopez commented Feb 28, 2022

Change description

This was causing validation to fail because of unexpected nulls, meaning that hubspot destinations could not be created.

Because these were in here to clear out invalid values, this should no longer be necessary since core's validation introduced in #2988 will prevent these from being set in the first place.

Also fixed up the filterEmptyOptions method to also clear nulls and undefineds

Checklists

Development

  • Application changes have been tested appropriately

Impact

  • Code follows company security practices and guidelines
  • Security impact of change has been considered
  • Performance impact of change has been considered
  • Possible migration needs considered (model migrations, config migrations, etc.)

Please explain any security, performance, migration, or other impacts if relevant:

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached where applicable.
  • Relevant tags have been added to the PR (bug, enhancement, internal, etc.)

@pedroslopez pedroslopez added the bug Something isn't working label Feb 28, 2022
Comment on lines 383 to +385
Object.keys(opts).forEach((k) => {
if (opts[k] === "") delete opts[k];
if (typeof opts[k] === "undefined" || opts[k] === null || opts[k] === "")
delete opts[k];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@pedroslopez pedroslopez merged commit 5d51266 into main Feb 28, 2022
@pedroslopez pedroslopez deleted the fix-hubspot-options branch February 28, 2022 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants