From 813de6e31d9a91bf39848939c01524ecb5e7fd48 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 18 Nov 2025 20:42:10 +0000 Subject: [PATCH] Fix error on init --- .../src/views/cursors/remote-cursors-plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/obsidian-plugin/src/views/cursors/remote-cursors-plugin.ts b/frontend/obsidian-plugin/src/views/cursors/remote-cursors-plugin.ts index 86ddd6cd..5f867f90 100644 --- a/frontend/obsidian-plugin/src/views/cursors/remote-cursors-plugin.ts +++ b/frontend/obsidian-plugin/src/views/cursors/remote-cursors-plugin.ts @@ -33,7 +33,7 @@ export class RemoteCursorsPluginValue implements PluginValue { isOutdated: boolean; }[] = []; - private static app: App; + private static app?: App; public decorations: DecorationSet = RangeSet.of([]); public static setCursors( @@ -88,7 +88,7 @@ export class RemoteCursorsPluginValue implements PluginValue { private static findFileForEditor( editor: EditorView ): RelativePath | undefined { - return RemoteCursorsPluginValue.app.workspace + return RemoteCursorsPluginValue.app?.workspace .getLeavesOfType("markdown") .map((leaf) => leaf.view) .filter((view) => view instanceof MarkdownView)