From 41d32ce7d17797831c339d447e54c0eb43d985fb Mon Sep 17 00:00:00 2001 From: Alexey Ivanov Date: Wed, 22 Sep 2021 13:36:20 +0300 Subject: [PATCH] [refactor] GH-99 Fix optional viewKindElement.elements --- src/components/graphRenderer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/graphRenderer.tsx b/src/components/graphRenderer.tsx index 2baf8c5..486f2ae 100644 --- a/src/components/graphRenderer.tsx +++ b/src/components/graphRenderer.tsx @@ -30,7 +30,7 @@ export const GraphRenderer = observer((props) => { console.log('GraphRenderer - start'); // ensure that we render Graph only after all data is not empty let isAllNotEmpty = true; - const elements = findElementsRecursive(viewDescr, viewKindElement.elements, (params: any) => { + const elements = findElementsRecursive(viewDescr, viewKindElement.elements || [], (params: any) => { const collIriOverride = params[2]; ////[id, collIri, collIriOverride, inCollPath, viewKindElement, viewDescrElement] if (!store.getColl(collIriOverride) || store.getColl(collIriOverride)?.data.length <= 0) { isAllNotEmpty = false;