Skip to content

Commit ec26d0e

Browse files
chore: remove parentesis with regex from shipping name
1 parent cadd7c2 commit ec26d0e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

functions/routes/ecom/modules/calculate-shipping.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ exports.post = ({ appSdk }, req, res) => {
152152
const shippingResult = data
153153
let lowestPriceShipping
154154
shippingResult.forEach(shipping => {
155-
const { shipmentCompany, deadline, value } = shipping
155+
let { shipmentCompany, deadline, value } = shipping
156+
shipmentCompany = shipmentCompany.replace(/\([^)]*\)/g, '')
156157
// check if service is not disabled
157158
let isAvailable = true
158159
if (Array.isArray(appData.unavailable_for) && appData.unavailable_for.length) {

0 commit comments

Comments
 (0)