Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachatoo committed Oct 29, 2023
1 parent d669863 commit 68b2753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/canvas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, ItemView } from "obsidian";
import { App, ItemView, ViewStateResult } from "obsidian";
import { CanvasNodeData, CanvasData, CanvasState } from "obsidian/canvas";

export function isCanvasNodeData(node: unknown): node is CanvasNodeData {
Expand Down Expand Up @@ -55,7 +55,7 @@ export function setActiveCanvasData(view: ItemView, data: unknown) {
view.setViewData(JSON.stringify(data), true);
view.requestSave();
if (isCanvasState(state)) {
view.setState(state, {});
view.setState(state, {} as ViewStateResult);
} else {
throw new Error("Failed to reset zoom.");
}
Expand Down

0 comments on commit 68b2753

Please sign in to comment.