rerobe-js-orm 3.3.4 → 3.3.6
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.
- package/lib/models/Product.js +7 -5
- package/package.json +1 -1
package/lib/models/Product.js
CHANGED
|
@@ -496,7 +496,7 @@ class Product extends Base_1.default {
|
|
|
496
496
|
{
|
|
497
497
|
title: 'Purchase Details',
|
|
498
498
|
attributes: [
|
|
499
|
-
compareAtPrice && `${t('Original price')}: ${t(
|
|
499
|
+
compareAtPrice && `${t('Original price')}: ${t(compareAtPrice)}`,
|
|
500
500
|
purchasePrice && `${t('Purchase price')}: ${t(purchasePrice)}`,
|
|
501
501
|
yearPurchased && `${t('Year purchased')}: ${t(yearPurchased)}`,
|
|
502
502
|
].filter(Boolean),
|
|
@@ -514,22 +514,24 @@ class Product extends Base_1.default {
|
|
|
514
514
|
// Generate HTML for base attribute sections
|
|
515
515
|
baseAttributeSections.forEach((section) => {
|
|
516
516
|
const sectionHTML = section.attributes
|
|
517
|
-
.map((attribute) =>
|
|
517
|
+
.map((attribute) => attribute ? `<li class="editor-listitem"><span style="white-space: pre-wrap;">${attribute}</span></li>` : '')
|
|
518
518
|
.filter(Boolean) // Removes any falsey values
|
|
519
519
|
.join('\n');
|
|
520
520
|
if (sectionHTML) {
|
|
521
|
-
sectionsHTML.push(`<
|
|
521
|
+
sectionsHTML.push(`<p class="editor-paragraph" dir="ltr"><b><strong class="editor-text-bold" style="white-space: pre-wrap;">${t(section.title)}</strong></b></p>` + `<ul class="editor-list-ul">\n${sectionHTML}\n</ul>`);
|
|
522
522
|
}
|
|
523
523
|
});
|
|
524
524
|
// Generate HTML for additional sections
|
|
525
525
|
additionalSections.forEach((section) => {
|
|
526
526
|
if (section.title && section.attributes && section.attributes.length > 0) {
|
|
527
527
|
const sectionHTML = section.attributes
|
|
528
|
-
.map((attribute) =>
|
|
528
|
+
.map((attribute) => attribute
|
|
529
|
+
? `<li class="editor-listitem"><span style="white-space: pre-wrap;">${t(attribute)}</span></li>`
|
|
530
|
+
: '')
|
|
529
531
|
.filter(Boolean) // Removes any falsey values
|
|
530
532
|
.join('\n');
|
|
531
533
|
if (sectionHTML) {
|
|
532
|
-
sectionsHTML.push(`<
|
|
534
|
+
sectionsHTML.push(`<p class="editor-paragraph" dir="ltr"><b><strong class="editor-text-bold" style="white-space: pre-wrap;">${t(section.title)}</strong></b></p>` + `<ul class="editor-list-ul">\n${sectionHTML}\n</ul>`);
|
|
533
535
|
}
|
|
534
536
|
}
|
|
535
537
|
});
|