From 7714535874abfddef8766e1cc02d2af60f51c4b3 Mon Sep 17 00:00:00 2001 From: Camden Date: Mon, 20 May 2024 14:19:39 -0400 Subject: [PATCH] fix incorrect substring index (#284) --- packages/core-data/src/utils/Typesense.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-data/src/utils/Typesense.js b/packages/core-data/src/utils/Typesense.js index 31dadac3..8e872557 100644 --- a/packages/core-data/src/utils/Typesense.js +++ b/packages/core-data/src/utils/Typesense.js @@ -107,7 +107,7 @@ const getFieldId = (attribute: string) => { let value = attribute.replaceAll(SUFFIX_FACET, ''); if (value.includes(ATTRIBUTE_DELIMITER)) { - value = value.substring(value.indexOf(ATTRIBUTE_DELIMITER) + 1, value.length - 1); + value = value.substring(value.indexOf(ATTRIBUTE_DELIMITER) + 1, value.length); } return value;