mirror of
https://github.com/jvsteiner/send-note.git
synced 2026-07-22 11:20:26 +00:00
Possible fix for #83
This commit is contained in:
parent
a43dc798c0
commit
1d03bc2c36
1 changed files with 2 additions and 2 deletions
|
|
@ -67,9 +67,9 @@ export default class Note {
|
|||
constructor (plugin: SharePlugin) {
|
||||
this.plugin = plugin
|
||||
// .getLeaf() doesn't return a `previewMode` property when a note is pinned,
|
||||
// so use the activeEditor.leaf
|
||||
// so use the undocumented .getActiveFileView() which seems to work fine
|
||||
// @ts-ignore
|
||||
this.leaf = this.plugin.app.workspace.activeEditor?.leaf
|
||||
this.leaf = this.plugin.app.workspace.getActiveFileView()?.leaf
|
||||
this.elements = []
|
||||
this.template = new NoteTemplate()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue