1.5.11 fix for #327

This commit is contained in:
Zsolt Viczian
2021-12-30 19:15:34 +01:00
parent 1796402ced
commit 1ce44c2d55
4 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "1.5.10",
"version": "1.5.11",
"minAppVersion": "0.12.16",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",

View File

@@ -210,6 +210,7 @@ export class ExcalidrawData {
file: TFile,
textMode: TextMode,
): Promise<boolean> {
if(!file) return false;
this.loaded = false;
this.textElements = new Map<
string,
@@ -340,6 +341,7 @@ export class ExcalidrawData {
}
public async loadLegacyData(data: string, file: TFile): Promise<boolean> {
if(!file) return false;
this.compatibilityMode = true;
this.file = file;
this.textElements = new Map<

View File

@@ -1723,7 +1723,7 @@ export default class ExcalidrawPlugin extends Plugin {
if (f.extension == "excalidraw") {
return true;
}
const fileCache = this.app.metadataCache.getFileCache(f);
const fileCache = f ? this.app.metadataCache.getFileCache(f) : null;
return !!fileCache?.frontmatter && !!fileCache.frontmatter[FRONTMATTER_KEY];
}
}

View File

@@ -1,4 +1,4 @@
{
"1.5.10": "0.12.16",
"1.5.11": "0.12.16",
"1.4.2": "0.11.13"
}