Skip to content

Commit

Permalink
Merge pull request #51 from vonalbert/patch-1
Browse files Browse the repository at this point in the history
Check for existance of ExcalidrawAutomate
  • Loading branch information
beaussan authored Jul 28, 2023
2 parents 5e211bb + 6ec8113 commit bf1d674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class UpdateTimeOnSavePlugin extends Plugin {
}

//@ts-ignore
const ea: any = ExcalidrawAutomate; //ea will be undefined if the Excalidraw plugin is not running
const ea: any = typeof ExcalidrawAutomate === "undefined" ? undefined : ExcalidrawAutomate; //ea will be undefined if the Excalidraw plugin is not running
const isExcalidrawFile = ea ? ea.isExcalidrawFile(file) : false;

if (isExcalidrawFile) {
Expand Down

0 comments on commit bf1d674

Please sign in to comment.