getFieldId
in TypesenseUtils
truncates the last character of each field name
#280
Labels
v2.2.3
Issues in v2.2.3
I was looking into why labels weren't working in Sapientia and noticed that the UUIDs
FacetListsGrouped
was passing to myresolveLabel
prop were missing their final character. Going up the stack toreact-components
, I think I found where the issue is coming from.getFieldId
uses thesubstring
method to separate a field UUID from its parent model's UUID:The substring here ends at
value.length - 1
. This would be the correct way to look up the last item in an array by index, butsubstring
's second argument is exclusive, not inclusive, so the string slice stops beforevalue.length - 1
, leaving off the last character.Correcting this bug should be as simple as changing
value.length - 1
to justvalue.length
.(See https://github.com/performant-software/react-components/blob/master/packages/core-data/src/utils/Typesense.js#L110)
The text was updated successfully, but these errors were encountered: