diff --git a/src/canvas-patch.ts b/src/canvas-patch.ts index eb1ed12..c9b0acc 100644 --- a/src/canvas-patch.ts +++ b/src/canvas-patch.ts @@ -22,7 +22,7 @@ export function performCanvasMonkeyPatch(plugin: Plugin) { if (!canvasNodePrototype) { plugin.registerEvent( - this.app.workspace.on("active-leaf-change", () => { + plugin.app.workspace.on("active-leaf-change", () => { const view = app.workspace.getActiveViewOfType(ItemView); checkCanvasMonkeyPatch(view); })