Skip to content

Commit

Permalink
refactor: return null if excalidraw not found for API
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed May 11, 2024
1 parent 30e02fb commit 009560d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/conversion/compiler/excalidraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { App,TFile } from "obsidian";
export async function convertToHTMLSVG(file: TFile, app: App) {
try {
const excalidraw = app.plugins.getPlugin("obsidian-excalidraw-plugin");
if (!excalidraw) return null;
// @ts-ignore
const ea = excalidraw.ea;
const svg = await ea.createSVG(file.path, ea.getExportSettings(true, true));
Expand Down

0 comments on commit 009560d

Please sign in to comment.