Skip to content

Commit 6df8088

Browse files
svenefftingeroboquat
authored andcommitted
[server] don't fail on undefined currency
1 parent b774d7a commit 6df8088

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/server/ee/src/workspace/gitpod-server-impl.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,12 +2160,10 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
21602160
if (customer) {
21612161
// NOTE: this is a temporary workaround, as long as we're not automatically re-create the customer
21622162
// entity on Stripe to support a switch of currencies, we're taking an exit here.
2163-
if (customer.currency !== currency) {
2163+
if (customer.currency && customer.currency !== currency) {
21642164
throw new ResponseError(
21652165
ErrorCodes.SUBSCRIPTION_ERROR,
2166-
`Your previous subscription was in ${
2167-
customer.currency || "unknown"
2168-
}. If you'd like to change currencies, please contact our support.`,
2166+
`Your previous subscription was in ${customer.currency}. If you'd like to change currencies, please contact our support.`,
21692167
{ hint: "currency", oldValue: customer.currency, value: currency },
21702168
);
21712169
}

0 commit comments

Comments
 (0)