From 42d5fe701275e75b62ba4b9b741b4e5b92222e3e Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Wed, 9 Nov 2022 15:07:58 +0100 Subject: [PATCH] fix: Types --- app/configurator/components/use-hierarchy-parents.spec.ts | 2 +- app/configurator/components/use-hierarchy-parents.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/configurator/components/use-hierarchy-parents.spec.ts b/app/configurator/components/use-hierarchy-parents.spec.ts index 744574fef..67517c3a7 100644 --- a/app/configurator/components/use-hierarchy-parents.spec.ts +++ b/app/configurator/components/use-hierarchy-parents.spec.ts @@ -9,7 +9,7 @@ describe("grouping hierarchy by parents", () => { const iri = "https://ld.admin.ch/cube/dimension/aussenhandel_warenkoerbe/1_listZT"; const ztGroups = groups.filter( - ([parents, values]) => + ([parents]) => parents.length > 0 && parents[parents.length - 1].value === iri )!; diff --git a/app/configurator/components/use-hierarchy-parents.tsx b/app/configurator/components/use-hierarchy-parents.tsx index 72fc222aa..c75d9a921 100644 --- a/app/configurator/components/use-hierarchy-parents.tsx +++ b/app/configurator/components/use-hierarchy-parents.tsx @@ -71,7 +71,7 @@ export const hierarchyToGraphviz = ( hierarchy: DimensionHierarchyQueryHierarchy ) => { const lines = [] as string[]; - dfs(hierarchy, (node, { depth, parents }) => { + dfs(hierarchy, (node, { parents }) => { lines.push(`"${node.value}"[label="${node.label.replace(/"/g, "")}"]`); if (parents.length > 0) { const parent = parents[parents.length - 1];