Fix error on init
This commit is contained in:
parent
e75298c4f1
commit
813de6e31d
1 changed files with 2 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ export class RemoteCursorsPluginValue implements PluginValue {
|
||||||
isOutdated: boolean;
|
isOutdated: boolean;
|
||||||
}[] = [];
|
}[] = [];
|
||||||
|
|
||||||
private static app: App;
|
private static app?: App;
|
||||||
public decorations: DecorationSet = RangeSet.of([]);
|
public decorations: DecorationSet = RangeSet.of([]);
|
||||||
|
|
||||||
public static setCursors(
|
public static setCursors(
|
||||||
|
|
@ -88,7 +88,7 @@ export class RemoteCursorsPluginValue implements PluginValue {
|
||||||
private static findFileForEditor(
|
private static findFileForEditor(
|
||||||
editor: EditorView
|
editor: EditorView
|
||||||
): RelativePath | undefined {
|
): RelativePath | undefined {
|
||||||
return RemoteCursorsPluginValue.app.workspace
|
return RemoteCursorsPluginValue.app?.workspace
|
||||||
.getLeavesOfType("markdown")
|
.getLeavesOfType("markdown")
|
||||||
.map((leaf) => leaf.view)
|
.map((leaf) => leaf.view)
|
||||||
.filter((view) => view instanceof MarkdownView)
|
.filter((view) => view instanceof MarkdownView)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue