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

[Sendgrid] - minor bug preventing dynamic field from working #2591

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joe-ayoub-segment
Copy link
Contributor

Sendgrid - fixing Dynamic dropdown bug

Testing

Tested locally. Action behind FF

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.54%. Comparing base (83d22bf) to head (6de817e).

Files with missing lines Patch % Lines
.../destinations/sendgrid/sendEmail/dynamic-fields.ts 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2591      +/-   ##
==========================================
- Coverage   78.56%   78.54%   -0.02%     
==========================================
  Files        1024     1024              
  Lines       18079    18083       +4     
  Branches     3405     3413       +8     
==========================================
+ Hits        14203    14204       +1     
- Misses       2742     2745       +3     
  Partials     1134     1134              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -51,8 +52,14 @@ export async function dynamicTemplateData(request: RequestClient, payload: Paylo
throw new Error('Template ID Field required before Dynamic Template Data fields can be configured')
}

const templateId = parseTemplateId(payload.template_id ?? '')

if (templateId == null || !templateId.startsWith('d-')) {
Copy link
Member

Choose a reason for hiding this comment

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

should there be an additional || templateId === '' here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants