Skip to content

Commit f87ab92

Browse files
committed
ESLint fixes
1 parent 9eb9542 commit f87ab92

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

components/chargebee/actions/create-customer/create-customer.mjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import chargebee from "../../chargebee.app.mjs";
2+
import { clearObject } from "../../common/utils.mjs";
23

34
export default {
45
key: "chargebee-create-customer",
@@ -52,18 +53,15 @@ export default {
5253
},
5354
},
5455
async run({ $ }) {
55-
const response = await this.chargebee.createCustomer(Object.fromEntries(Object.entries({
56+
const response = await this.chargebee.createCustomer(clearObject({
5657
id: this.id,
5758
first_name: this.firstName,
5859
last_name: this.lastName,
5960
email: this.email,
6061
phone: this.phone,
6162
company: this.company,
6263
...this.additionalFields,
63-
}).filter(([
64-
_,
65-
v,
66-
]) => v !== undefined)));
64+
}));
6765

6866
$.export("$summary", `Successfully created customer (ID: ${response?.customer?.id})`);
6967
return response;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function clearObject(obj) {
22
return Object.fromEntries(Object.entries(obj).filter(([
3-
_,
3+
,
44
v,
55
]) => v !== undefined));
66
}

0 commit comments

Comments
 (0)