summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-08-03 11:58:05 +0200
committerThomas F. K. Jorna <[email protected]>2021-08-03 11:58:05 +0200
commit75274aba538891bbd3554db235b7aace4851afbc (patch)
treeea48860cbc8ce157557d3d20d5668468dae8f520
parent4fa4e4466d13df1e06796fcaa1ac6c617f47dcdb (diff)
fix: set tags to [] if no tags are found
-rw-r--r--pages/index.tsx2
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,