Skip to content

Commit 6cb4a3e

Browse files
committed
fix: improve purchaseAmount handling for better null checks
1 parent 86b2d08 commit 6cb4a3e

File tree

1 file changed

+4
-1
lines changed
  • packages/internal/store/src/morph

1 file changed

+4
-1
lines changed

packages/internal/store/src/morph/hono.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ class Morph {
9898
feedIds: data.feedIds!,
9999
fee: data.fee!,
100100
subscriptionCount: "subscriptionCount" in data ? data.subscriptionCount : null,
101-
purchaseAmount: "purchaseAmount" in data ? String(data.purchaseAmount) : null,
101+
purchaseAmount:
102+
"purchaseAmount" in data && data.purchaseAmount !== null
103+
? String(data.purchaseAmount)
104+
: null,
102105
}
103106
}
104107

0 commit comments

Comments
 (0)