Allow poorly formated .excalidraw files to render

There are several excalidraw implementations which fail to follow the defined excalidraw JSON schema. This allows those poorly formatted files to render in legacy mode in Obsidian.
This commit is contained in:
hackerESQ
2024-12-17 22:06:54 -06:00
committed by GitHub
parent b832a51a5b
commit 6d60bcf6eb

View File

@@ -518,7 +518,7 @@ export class ExcalidrawData {
return;
}
const saveVersion = this.scene.source.split("https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/")[1]??"1.8.16";
const saveVersion = this.scene.source?.split("https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/")[1]??"1.8.16";
const elements = this.scene.elements;
for (const el of elements) {