vtex / faststore

Digital commerce toolkit for frontend developers
https://faststore.dev
MIT License
182 stars 57 forks source link

adjust sku validation #2353

Closed rayssamfreitas closed 3 weeks ago

rayssamfreitas commented 1 month ago

What's the purpose of this pull request?

Need to adjust the SKU validation because when selecting an SKU with the name "7", for example, the SKU with the name "7.5" is being selected instead of "7".

How it works?

The adjustment involves replacing the code that previously used slugs.includes() with strict equality slugs ===

How to test it?

On a product page with SKUs, if you select one named '7', you'll notice that it selects SKU '7.5' instead.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 2:34pm
codesandbox-ci[bot] commented 1 month ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

eduardoformiga commented 3 weeks ago

@rayssamfreitas, can you double-check if this version fixes the problem?

"@faststore/core": "https://pkg.csb.dev/vtex/faststore/commit/9ec25832/@faststore/core"

rayssamfreitas commented 3 weeks ago

@eduardoformiga, I've tested your version and it works! It resolves the issue. Thank you! I'll close this PR.

eduardoformiga commented 3 weeks ago

Nice! The faststore core version 3.0.77 was published with the fix 🎉