From aa948be23ef3c50eb94e5db9211d550cde3bd97d Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:06:29 +0530 Subject: [PATCH] Update src/v0/destinations/klaviyo/transform.js Co-authored-by: Krishna Chaitanya --- src/v0/destinations/klaviyo/transform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v0/destinations/klaviyo/transform.js b/src/v0/destinations/klaviyo/transform.js index de864b9486..e45bc74155 100644 --- a/src/v0/destinations/klaviyo/transform.js +++ b/src/v0/destinations/klaviyo/transform.js @@ -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;