From b45ee1895598e2a30f7caca0127743cda7b4e420 Mon Sep 17 00:00:00 2001 From: Shinsina <46794001+Shinsina@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:25:45 -0500 Subject: [PATCH] Simplify resolution and remove error logic --- .../components/core-native-x-fetch.marko | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/marko-newsletters-native-x/components/core-native-x-fetch.marko b/packages/marko-newsletters-native-x/components/core-native-x-fetch.marko index d8be0192b..29fa1a54f 100644 --- a/packages/marko-newsletters-native-x/components/core-native-x-fetch.marko +++ b/packages/marko-newsletters-native-x/components/core-native-x-fetch.marko @@ -37,21 +37,8 @@ $ const timestamp = date ? dateToTimestamp(date) : undefined; req, debug, })> - $ const resolvedData = get(resolved, "data"); - $ const dataIsArray = Array.isArray(resolvedData); - $ if (resolvedData && dataIsArray && resolvedData.length) { - if (resolvedData.find((datapoint) => !get(datapoint, 'creative.mindfulCreativeId'))) { - throw new Error('Unable to parse mindful creative id(s) from ad response.'); - } - } else if (resolvedData && !dataIsArray) { - if (!get(resolved, "data.creative.mindfulCreativeId")) { - throw new Error('Unable to parse mindful creative id from ad response.'); - } - } - $ const mindfulCreativeId = get(resolved, "data.creative.mindfulCreativeId"); <${input.renderBody} data=resolved.data - creative-id=mindfulCreativeId tenant=mindfulTenant />