@lancom/shared 0.0.150 → 0.0.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/nuxt.config.js +5 -3
  2. package/package.json +1 -1
package/nuxt.config.js CHANGED
@@ -110,9 +110,11 @@ module.exports = (config, axios, { raygunClient } = {}) => ({
110
110
  const catalogFrontImages = (product.images || []).filter(i => (i.types || []).includes('catalog_front')).map(i => i.image);
111
111
  const image = spliceFirstImage(feedImages) || spliceFirstImage(frontImages) || spliceFirstImage(catalogFrontImages) || spliceFirstImage(backImages) || {};
112
112
  const images = getImages(backImages) || getImages(frontImages) || [];
113
- const title = product.feedTitle
114
- ? product.feedTitle.replace('{colour}', sp.color.name).replace('{size}', sp.size.name).replace('{brand}', product.brand.name)
115
- : `${product.name} ${sp.color.name}`;
113
+ const feedTitle = (product.feedTitle || '')
114
+ .replace(/{colour}/g, sp.color.name)
115
+ .replace(/{size}/g, sp.size.name)
116
+ .replace(/{brand}/g, product.brand.name)
117
+ const title = feedTitle || `${product.name} ${sp.color.name}`;
116
118
  const description = `${product.description || product.fabricInfoShort || product.name || ''}`
117
119
  .replace(/ /g, ' ')
118
120
  .replace(/·/, '·');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.150",
3
+ "version": "0.0.151",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {