summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-08-16 12:49:33 +0200
committerThomas F. K. Jorna <[email protected]>2021-08-16 12:49:33 +0200
commit8b32395306bfdead78b58840e7dfd0e215737eb5 (patch)
tree637c17db769256eb719e86d11e6b469f46529fbd /pages
parent4a1aa15c9533f4609ef0e0d9a3bf12bbe749649a (diff)
fix: local mode yielded error sometimes
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 7434e3d..960ab5e 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1006,7 +1006,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
visuals.highlightFade * opacity,
)
}
- if (visuals.citeLinkColor && roamLink.type.includes('cite')) {
+ if (visuals.citeLinkColor && roamLink.type?.includes('cite')) {
return needsHighlighting && (visuals.citeLinkHighlightColor || visuals.linkHighlight)
? highlightColors[visuals.citeLinkColor][
visuals.citeLinkHighlightColor || visuals.linkHighlight
@@ -1138,7 +1138,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
{...graphCommonProps}
linkLineDash={(link) => {
const linkArg = link as OrgRoamLink
- if (visuals.citeDashes && linkArg.type.includes('cite')) {
+ if (visuals.citeDashes && linkArg.type?.includes('cite')) {
return [visuals.citeDashLength, visuals.citeGapLength]
}
if (visuals.refDashes && linkArg.type == 'ref') {