diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-08-03 11:58:05 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-08-03 11:58:05 +0200 |
commit | 75274aba538891bbd3554db235b7aace4851afbc (patch) | |
tree | ea48860cbc8ce157557d3d20d5668468dae8f520 | |
parent | 4fa4e4466d13df1e06796fcaa1ac6c617f47dcdb (diff) |
fix: set tags to [] if no tags are found
-rw-r--r-- | pages/index.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index 9e46f45..b31e533 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -84,7 +84,7 @@ export function GraphPage() { const tagsRef = useRef<Tags>([]) const updateGraphData = (orgRoamGraphData: OrgRoamGraphReponse) => { - tagsRef.current = orgRoamGraphData.tags + tagsRef.current = orgRoamGraphData.tags ?? [] const nodesByFile = orgRoamGraphData.nodes.reduce<NodesByFile>((acc, node) => { return { ...acc, |