pretty js

This commit is contained in:
Rimian Perkins 2019-09-12 17:47:44 +10:00
parent ba73e688f2
commit 035187d843
1 changed files with 6 additions and 6 deletions

View File

@ -42,20 +42,20 @@ export default Ember.Component.extend({
}, },
validateBilling() { validateBilling() {
const billing = this.get('billing'); const billing = this.get("billing");
const deleteEmpty = (key) => { const deleteEmpty = key => {
if(Ember.isEmpty(billing.get(key))) { if (Ember.isEmpty(billing.get(key))) {
billing.set(key, undefined); billing.set(key, undefined);
} }
} };
['name', 'phone', 'email'].forEach((key) => deleteEmpty(key)); ["name", "phone", "email"].forEach(key => deleteEmpty(key));
}, },
actions: { actions: {
submitStripeCard() { submitStripeCard() {
this.validateBilling(); this.validateBilling();
const paymentOptions = { billing_details: this.get('billing') }; const paymentOptions = { billing_details: this.get("billing") };
this.stripe.createPaymentMethod("card", this.card, paymentOptions).then( this.stripe.createPaymentMethod("card", this.card, paymentOptions).then(
result => { result => {