We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f8afba commit af44099Copy full SHA for af44099
src/main.ts
@@ -237,10 +237,10 @@ export default class FindOrphanedFilesPlugin extends Plugin {
237
async (canvasFile: TFile) => {
238
// Read the canvas file as JSON
239
const canvasFileContent: CanvasData = JSON.parse(
240
- await this.app.vault.cachedRead(canvasFile)
+ (await this.app.vault.cachedRead(canvasFile)) || "{}"
241
);
242
// Get a list of all links within the canvas file
243
- canvasFileContent.nodes.forEach((node) => {
+ canvasFileContent.nodes?.forEach((node) => {
244
let linkTexts: string[] = [];
245
246
if (node.type === "file") {
0 commit comments