Skip to content

Commit 772dfa4

Browse files
authored
chore: replacing dots to - on product name for generated slug
1 parent 70c5b95 commit 772dfa4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

functions/lib/integration/parsers/product-to-ecomplus.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ module.exports = async (tinyProduct, storeId, auth, isNew = true, tipo, appData)
119119
}
120120
if (!product.slug) {
121121
product.slug = removeAccents(name.toLowerCase())
122-
.replace(/\s+/g, '-')
123-
.replace(/[^a-z0-9-_./]/g, '')
122+
.replace(/[\s.]+/g, '-')
123+
.replace(/[^a-z0-9-_/]/g, '')
124124
if (!/[a-z0-9]/.test(product.slug.charAt(0))) {
125125
product.slug = `p-${product.slug}`
126126
}

0 commit comments

Comments
 (0)