From 70fa123a771914d6fc1387e7e6ebc0b2e4db4d5d Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:32:08 +0530 Subject: [PATCH] chore: address initialization comment --- .../sources/shopify/webhookTransformations/serverSideUtlis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v1/sources/shopify/webhookTransformations/serverSideUtlis.js b/src/v1/sources/shopify/webhookTransformations/serverSideUtlis.js index 1ac60f967d..0afbf30277 100644 --- a/src/v1/sources/shopify/webhookTransformations/serverSideUtlis.js +++ b/src/v1/sources/shopify/webhookTransformations/serverSideUtlis.js @@ -46,8 +46,8 @@ const createPropertiesForEcomEventFromWebhook = (message) => { */ const getAnonymousIdFromAttributes = async (event) => { let anonymousId = null; - const noteAttributes = event.note_attributes; - if (isDefinedAndNotNull(event) && isDefinedAndNotNull(noteAttributes)) { + if (isDefinedAndNotNull(event) && isDefinedAndNotNull(event.note_attributes)) { + const noteAttributes = event.note_attributes; const rudderAnonymousIdObject = noteAttributes.find( (attr) => attr.name === 'rudderAnonymousId', );