From ccaa3b8013962493c24ee7617466cc0cd386bfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Baltazar?= Date: Sun, 1 Jan 2023 19:07:43 +0000 Subject: [PATCH] fix: plugin monkey patch register event --- src/canvas-patch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); })