summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-07 02:05:58 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-07 02:05:58 +0200
commitf495a9499c549d92d64ee3a2e50a239ea769c609 (patch)
tree2f560b4dc24bc31ac3d9af05d6918c87d63377d6 /pages
parentbae6487afd5e6eec9f04b38b235bbac24042ca62 (diff)
fix: make daily toggle useful
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index a40f942..c180ad9 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -361,7 +361,6 @@ export function GraphPage() {
return updateGraphData(message.data)
case 'variables':
variablesRef.current = message.data
- console.log(message.data)
return
case 'theme':
return setEmacsTheme(['custom', message.data])
@@ -626,7 +625,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
hiddenNodeIdsRef.current = { ...hiddenNodeIdsRef.current, [node.id]: node }
return false
}
- if (filter.filelessCites && node.properties.FILELESS) {
+ if (filter.filelessCites && node?.properties?.FILELESS) {
hiddenNodeIdsRef.current = { ...hiddenNodeIdsRef.current, [node.id]: node }
return false
}
@@ -635,7 +634,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
return false
}
- if (filter.dailies && dailyDir?.length !== 0 && node.file.includes(dailyDir)) {
+ if (filter.dailies && dailyDir && node.file?.includes(dailyDir)) {
hiddenNodeIdsRef.current = { ...hiddenNodeIdsRef.current, [node.id]: node }
return false
}