rerobe-js-orm 3.3.4 → 3.3.5
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 +6 -4
- package/package.json +1 -1
package/lib/models/Product.js
CHANGED
|
@@ -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
|
});
|