rerobe-js-orm 3.3.8 → 3.3.9

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.
@@ -434,7 +434,11 @@ class Product extends Base_1.default {
434
434
  const singularProductType = this.utilities.singularizeProductType(productType);
435
435
  // Function to build the title
436
436
  const buildTitle = (includeProductType) => {
437
- const parts = [color.trim(), brand.trim()];
437
+ const parts = [color.trim()];
438
+ if (brand.includes('Vintage')) {
439
+ // For 'Vintage' brands, include the brand with the color
440
+ parts.push(brand.trim());
441
+ }
438
442
  if (productStyle && productStyle.length > 0) {
439
443
  parts.push(productStyle.join(', ').trim());
440
444
  }
@@ -442,7 +446,8 @@ class Product extends Base_1.default {
442
446
  parts.push(singularProductType.trim());
443
447
  }
444
448
  const baseTitle = parts.join(' ');
445
- const titleWithBrand = brand.includes('Vintage') ? baseTitle : `${baseTitle} by ${brand.trim()}`;
449
+ // For non-'Vintage' brands, append "by ${brand.trim()}"
450
+ const titleWithBrand = !brand.includes('Vintage') ? `${baseTitle} by ${brand.trim()}` : baseTitle;
446
451
  // Add size to the end of the title if it's available
447
452
  return size && size.trim() !== '' ? `${titleWithBrand}, Size ${size.trim()}` : titleWithBrand;
448
453
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",