Skip to content

Commit

Permalink
Fixed new event registration according to obsidian documentation #45
Browse files Browse the repository at this point in the history
Fixed new event registration according to obsidian documentation
  • Loading branch information
nicojeske authored Feb 27, 2024
2 parents 2ab17df + 33e30d6 commit 3ebe242
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export default class MouseWheelZoomPlugin extends Plugin {

async onload() {
await this.loadSettings();
this.app.workspace.on("window-open", (newWindow: WorkspaceWindow) => this.registerEvents(newWindow.win));
this.registerEvent(
this.app.workspace.on("window-open", (newWindow: WorkspaceWindow) => this.registerEvents(newWindow.win))
);
this.registerEvents(window);

this.addSettingTab(new MouseWheelZoomSettingsTab(this.app, this));
Expand Down

0 comments on commit 3ebe242

Please sign in to comment.