fixes
This commit is contained in:
@@ -19,11 +19,11 @@ export class SeoService {
|
||||
* Set Open Graph & Twitter Card meta tags for a product/item page.
|
||||
*/
|
||||
setItemMeta(item: Item): void {
|
||||
const price = item.discount > 0 ? getDiscountedPrice(item) : item.price;
|
||||
const price = item.discount > 0 ? getDiscountedPrice(item) : (item.price ?? 0);
|
||||
const imageUrl = this.resolveUrl(getMainImage(item));
|
||||
const itemUrl = `${this.siteUrl}/item/${item.itemID}`;
|
||||
const description = this.truncate(this.stripHtml(item.description), 160);
|
||||
const titleText = `${item.name} — ${this.siteName}`;
|
||||
const description = this.truncate(this.stripHtml(item.description || ''), 160);
|
||||
const titleText = `${item.name || 'Product'} — ${this.siteName}`;
|
||||
|
||||
this.title.setTitle(titleText);
|
||||
this.setCanonical(itemUrl);
|
||||
|
||||
Reference in New Issue
Block a user