tripstorekrabi-shared 1.26.1 → 1.26.2
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/package.json +1 -1
- package/product.js +2 -9
package/package.json
CHANGED
package/product.js
CHANGED
|
@@ -92,19 +92,12 @@ export function buildIndex(id, product) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
// Populate
|
|
95
|
+
// Populate keywords array
|
|
96
96
|
const validKeywords = Array.isArray(product.keywords)
|
|
97
97
|
? product.keywords.map((k) => String(k || '').trim()).filter(Boolean)
|
|
98
98
|
: [];
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
? product.tags.map((t) => String(t || '').trim()).filter(Boolean)
|
|
102
|
-
: [];
|
|
103
|
-
|
|
104
|
-
document.keywords = Array.from(new Set(validKeywords.length > 0 ? validKeywords : validTags));
|
|
105
|
-
|
|
106
|
-
// TODO stef Keep legacy tags synced for backward compatibility until tags is fully removed from frontend
|
|
107
|
-
document.tags = validTags.length > 0 ? Array.from(new Set(validTags)) : document.keywords;
|
|
100
|
+
document.keywords = Array.from(new Set(validKeywords));
|
|
108
101
|
|
|
109
102
|
if (isTransfer) {
|
|
110
103
|
document.from = String(product.from).trim();
|