Apply empty string to URL in event that vendorUrl is absent
This commit is contained in:
parent
5e88b001fa
commit
dcd08ac1b6
|
@ -22,12 +22,16 @@ export default function ProductListContent( props: {
|
|||
title: product.title,
|
||||
icon: product.icon,
|
||||
vendorName: product.vendorName,
|
||||
vendorUrl: appendURLParams( product.vendorUrl, [
|
||||
[ 'utm_source', 'extensionsscreen' ],
|
||||
[ 'utm_medium', 'product' ],
|
||||
[ 'utm_campaign', 'wcaddons' ],
|
||||
[ 'utm_content', 'devpartner' ],
|
||||
] ),
|
||||
vendorUrl: (
|
||||
product.vendorUrl ?
|
||||
appendURLParams( product.vendorUrl, [
|
||||
[ 'utm_source', 'extensionsscreen' ],
|
||||
[ 'utm_medium', 'product' ],
|
||||
[ 'utm_campaign', 'wcaddons' ],
|
||||
[ 'utm_content', 'devpartner' ],
|
||||
] ) :
|
||||
''
|
||||
),
|
||||
price: product.price,
|
||||
url: appendURLParams(
|
||||
product.url,
|
||||
|
|
Loading…
Reference in New Issue