mirror of
https://github.com/meld-cp/obsidian-build.git
synced 2026-07-22 07:30:25 +00:00
.
This commit is contained in:
parent
3f8aaf2610
commit
00d77f8f37
2 changed files with 3 additions and 3 deletions
2
main.ts
2
main.ts
|
|
@ -121,7 +121,7 @@ export default class MeldBuildPlugin extends Plugin {
|
|||
//await view.save();
|
||||
const compiler = new Compiler();
|
||||
const runner = compiler.compile(logger, editor, view);
|
||||
runner();
|
||||
runner?.();
|
||||
}catch(e){
|
||||
console.debug('here');
|
||||
await logger.error(e);
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ import { IoRunContextImplemention } from "./rci-io";
|
|||
|
||||
export class Compiler{
|
||||
|
||||
public compile( logger: RunLogger, editor: Editor, view: MarkdownView ) : () => void {
|
||||
public compile( logger: RunLogger, editor: Editor, view: MarkdownView ) : (() => void) | null {
|
||||
|
||||
const fileCache = app.metadataCache.getFileCache(view.file);
|
||||
|
||||
if (fileCache == null){
|
||||
return () => {};
|
||||
return null;
|
||||
}
|
||||
|
||||
// build context
|
||||
|
|
|
|||
Loading…
Reference in a new issue