Skip to content

Commit

Permalink
fix(get new freigth): fix shipping_line error is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Nov 28, 2023
1 parent b2e40d8 commit 1d3363c
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 @@ -81,7 +81,7 @@ const getNewFreight = async (storeId, itemsOrder, to, subtotal, shippingLineOrig

return {
app: sameApp,
service: service || sameApp.response?.shipping_services[0]
service: service || (sameApp.response?.shipping_services && sameApp.response?.shipping_services[0])
}
} else {
let minPrice = result[0]?.response?.shipping_services[0]?.shipping_line?.total_price
Expand Down

0 comments on commit 1d3363c

Please sign in to comment.