Closed casey-matt closed 2 weeks ago
Hey @chrisvdm, this is a tiny 1-line change to an edge case check in the retrieveStripeCustomer function. I tested it in my application locally & it fixes the error, but you're probably better suited to know if this result in unexpected impact somewhere.
I figured I'd just submit the PR instead to make it easier, instead of filing an issue.
Hey @casey-matt, thanks so much for this. Much appreciated 👍
Released!
It looks like the retrieveStripeCustomer implementation has a small bug where the conditional is flipped. My project is passing in customer ID similar to the example-store-stripe repo like this:
And eventually results in a call to retrieveStripeCustomer(), which triggers this error:
Based on the other examples in
customers.ts
, this assertion is meant to catch null values (== null
). It's currently flipped (!== null
). If this is the intended behavior, we should use a different assertion.