Skip to content

Commit

Permalink
fix(getNewFreight): Correct error if new shipping is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Dec 20, 2023
1 parent 6a3eeea commit b33bcd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/lib/galaxpay/update-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const getNewFreight = async (storeId, itemsOrder, to, subtotal, shippingLineOrig
service: service || (sameApp.response?.shipping_services && sameApp.response?.shipping_services[0])
}
} else {
if (!result[0]?.response?.shipping_services.length) return null
if (!result[0]?.response?.shipping_services?.length) return null

let minPrice = result[0]?.response?.shipping_services[0]?.shipping_line?.total_price
const indexPosition = { app: 0, service: 0 }
Expand Down

0 comments on commit b33bcd1

Please sign in to comment.