Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

update toNumber func

Pedro Ladeira043224a58d9e
diff --git a/apps/web/lib/api/rewards/reward-condition-metadata.ts b/apps/web/lib/api/rewards/reward-condition-metadata.ts
index 688e3df8f7..6e6639f0dc 100644
--- a/apps/web/lib/api/rewards/reward-condition-metadata.ts
+++ b/apps/web/lib/api/rewards/reward-condition-metadata.ts
@@ -17,6 +17,10 @@ function toNumber(fieldKey: unknown): number | undefined {
return undefined;
}
+ if (Array.isArray(fieldKey)) {
+ return undefined;
+ }
+
if (typeof fieldKey === "string") {
if (fieldKey.trim() === "" || Number.isNaN(Number(fieldKey))) {
return undefined;