Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Fix undefined variable error
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Nov 1, 2021
1 parent 62e62bf commit 42b6444
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const sendGridClient = require('@sendgrid/client');
* @returns {string}
*/
function getTemplateId(event, integration) {
const templateId = integration.config.templates[data.event] || '';
const templateId = integration.config.templates[event] || '';
if (!templateId) {
throw new Error(`Template ID is not available for event: ${data.event}`);
throw new Error(`Template ID is not available for event: ${event}`);
}
return templateId;
}
Expand Down

0 comments on commit 42b6444

Please sign in to comment.