From 7cc7d818e9817146123a35cca37f45170395bd9e Mon Sep 17 00:00:00 2001 From: Melvin Carvalho Date: Tue, 27 Jan 2026 08:50:36 +0100 Subject: [PATCH] Fix TypeError when subject is not a NamedNode Add type guard before calling .site() which only exists on NamedNode. Also removes stray console.log(). Fixes #227 --- src/dashboard/dashboardPane.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dashboard/dashboardPane.ts b/src/dashboard/dashboardPane.ts index 6ce29165..385de0c4 100644 --- a/src/dashboard/dashboardPane.ts +++ b/src/dashboard/dashboardPane.ts @@ -8,8 +8,7 @@ export const dashboardPane: PaneDefinition = { icon: icons.iconBase + 'noun_547570.svg', name: 'dashboard', label: subject => { - console.log() - if (subject.uri === subject.site().uri) { + if (subject.termType === 'NamedNode' && subject.uri === subject.site().uri) { return 'Dashboard' } return null