1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

dont send token when null

This commit is contained in:
Kyle Spearrin
2019-02-21 00:03:40 -05:00
parent 22727b5abe
commit cdfd828a8b
2 changed files with 4 additions and 2 deletions

View File

@@ -79,7 +79,9 @@ export class PremiumComponent implements OnInit {
this.formPromise = this.paymentComponent.createPaymentToken().then((result) => {
const fd = new FormData();
fd.append('paymentMethodType', result[1].toString());
fd.append('paymentToken', result[0]);
if (result[0] != null) {
fd.append('paymentToken', result[0]);
}
fd.append('additionalStorageGb', (this.additionalStorage || 0).toString());
return this.apiService.postPremium(fd);
}).then(() => {