From 035187d843afdbd2fb9f9e67f46d40b9302c67d3 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Thu, 12 Sep 2019 17:47:44 +1000 Subject: [PATCH] pretty js --- .../discourse/components/stripe-card.js.es6 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/discourse/components/stripe-card.js.es6 b/assets/javascripts/discourse/components/stripe-card.js.es6 index 59e8b8d..071812d 100644 --- a/assets/javascripts/discourse/components/stripe-card.js.es6 +++ b/assets/javascripts/discourse/components/stripe-card.js.es6 @@ -42,20 +42,20 @@ export default Ember.Component.extend({ }, validateBilling() { - const billing = this.get('billing'); - const deleteEmpty = (key) => { - if(Ember.isEmpty(billing.get(key))) { + const billing = this.get("billing"); + const deleteEmpty = key => { + if (Ember.isEmpty(billing.get(key))) { billing.set(key, undefined); } - } - ['name', 'phone', 'email'].forEach((key) => deleteEmpty(key)); + }; + ["name", "phone", "email"].forEach(key => deleteEmpty(key)); }, actions: { submitStripeCard() { this.validateBilling(); - const paymentOptions = { billing_details: this.get('billing') }; + const paymentOptions = { billing_details: this.get("billing") }; this.stripe.createPaymentMethod("card", this.card, paymentOptions).then( result => {