Skip to content

Commit

Permalink
fix: replace value with index in path join
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Jan 20, 2021
1 parent 69c7dc8 commit 13811eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getExtraValueMap(
const formattedValue = valueFormatter ? valueFormatter(value) : value;

values.set(key, formattedValue);
keys.set(path.map(({ value: v }) => v).join('__'), values);
keys.set(path.map(({ index }) => index).join('__'), values);
}

getExtraValueMap({ layers, valueFormatter }, children, keys);
Expand Down
2 changes: 1 addition & 1 deletion src/components/legend/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function getExtra(extraValues: Map<string, LegendItemExtraValues>, item:
if (extraValues.size === 0) {
return defaultExtra?.formatted ?? '';
}
const extraValueKey = path.map(({ value: v }) => v).join('__');
const extraValueKey = path.map(({ index }) => index).join('__');
const itemExtraValues = extraValues.get(extraValueKey);
const actionExtra = (childId && itemExtraValues?.get(childId)) ?? null;
if (extraValues.size !== totalItems) {
Expand Down

0 comments on commit 13811eb

Please sign in to comment.