From 343b7c5e36fcf4eaedeb27a43c2c6ed882d17163 Mon Sep 17 00:00:00 2001 From: Wender Lima Date: Fri, 1 Mar 2024 16:28:53 -0500 Subject: [PATCH] Avoiding error with reserved names --- CHANGELOG.md | 8 ++++++++ manifest.json | 2 +- react/utils/compatibilityLayer.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43dee2e3c..4d0a74c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed +- Returning the original function to map facets but now using dynamic key to avoid the "reserved words" error + +## [3.129.6] - 2024-02-23 + +### Fixed +- Removing invalid function from compatibilityLAyer + ## [3.129.5] - 2024-02-02 ### Added diff --git a/manifest.json b/manifest.json index 529d9e523..6817ce1a7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "search-result", "vendor": "vtex", - "version": "3.129.5", + "version": "3.129.6", "title": "VTEX Search Result", "description": "A search result wrapper component", "mustUpdateAt": "2019-04-25", diff --git a/react/utils/compatibilityLayer.js b/react/utils/compatibilityLayer.js index f6ec25599..efe7f40ff 100644 --- a/react/utils/compatibilityLayer.js +++ b/react/utils/compatibilityLayer.js @@ -54,7 +54,7 @@ export const buildSelectedFacetsAndFullText = (query, map, priceRange) => { } const addMap = facet => { - facet.map = facet.key + facet['map'] = facet.key if (facet.children) { facet.children.forEach(facetChild => addMap(facetChild))