From 994e3e8c8283256f7c17efc95c2b4871dfa13741 Mon Sep 17 00:00:00 2001 From: Sergii Kostyrko Date: Sun, 25 Feb 2024 15:09:28 +0200 Subject: [PATCH] fix: fix type error --- src/journal-manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal-manager.ts b/src/journal-manager.ts index facb9db..abfab2a 100644 --- a/src/journal-manager.ts +++ b/src/journal-manager.ts @@ -280,9 +280,9 @@ export class JournalManager extends Component { }); } if (this.config.calendarView.leaf === "left") { - this.app.workspace.getLeftLeaf(false).setViewState({ type: CALENDAR_VIEW_TYPE }); + this.app.workspace.getLeftLeaf(false)?.setViewState({ type: CALENDAR_VIEW_TYPE }); } else { - this.app.workspace.getRightLeaf(false).setViewState({ type: CALENDAR_VIEW_TYPE }); + this.app.workspace.getRightLeaf(false)?.setViewState({ type: CALENDAR_VIEW_TYPE }); } }