Skip to content

Commit bdd94ee

Browse files
committed
Fix SonarCloud issue
Local variables should not be declared and then immediately returned or thrown
1 parent 04329f3 commit bdd94ee

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

utils/functions/functions.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,8 @@ export const getFormattedCart = (data) => {
236236
};
237237

238238
export const createCheckoutData = (order) => {
239-
const checkoutData = {
239+
return {
240240
clientMutationId: uuidv4(),
241-
242241
billing: {
243242
firstName: order.firstName,
244243
lastName: order.lastName,
@@ -270,8 +269,6 @@ export const createCheckoutData = (order) => {
270269
isPaid: false,
271270
transactionId: 'hjkhjkhsdsdiui',
272271
};
273-
274-
return checkoutData;
275272
};
276273

277274
/**

0 commit comments

Comments
 (0)