fixed misplaced parse
This commit is contained in:
parent
5b5649a17d
commit
b2e57f8ff9
1 changed files with 1 additions and 2 deletions
|
|
@ -82,8 +82,7 @@ module.exports = (pool, query, authMiddleware) => {
|
|||
// Format shipping address for email
|
||||
let shippingAddress = 'No shipping address provided';
|
||||
if (order.shipping_address) {
|
||||
const address = typeof order.shipping_address === 'string' ?
|
||||
JSON.parse(order.shipping_address) : order.shipping_address;
|
||||
const address = typeof order.shipping_address === 'string' ? order.shipping_address : JSON.parse(order.shipping_address);
|
||||
|
||||
shippingAddress = `
|
||||
${address.name || ''}<br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue