Skip to content

Commit

Permalink
Update src/v0/destinations/klaviyo/transform.js
Browse files Browse the repository at this point in the history
Co-authored-by: Krishna Chaitanya <[email protected]>
  • Loading branch information
anantjain45823 and krishna2020 authored Jan 16, 2024
1 parent 13dd5ff commit aa948be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v0/destinations/klaviyo/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const trackRequestHandler = (message, category, destination) => {
const payload = {};
const { privateApiKey, flattenProperties } = destination.Config;
let event = get(message, 'event');
if (typeof event !== 'undefined' && typeof event !== 'string') {
if (event && typeof event !== 'string') {
throw new InstrumentationError('Event type should be a string or undefined');
}
event = event ? event.trim().toLowerCase() : event;
Expand Down

0 comments on commit aa948be

Please sign in to comment.