diff --git a/src/fs.ts b/src/fs.ts index dfcf8df..e91b1af 100644 --- a/src/fs.ts +++ b/src/fs.ts @@ -62,8 +62,7 @@ export function listCollectionFeatures( project: string, collection: string, ): TFile[] { - const ownMd = `${collection}.md`; - return listMarkdownFiles(app, collectionPath(project, collection), [ownMd]); + return listMarkdownFiles(app, collectionPath(project, collection), []); } export async function readFile(app: App, path: string): Promise { diff --git a/src/views/GridView.ts b/src/views/GridView.ts index feadb53..f4e029e 100644 --- a/src/views/GridView.ts +++ b/src/views/GridView.ts @@ -93,7 +93,9 @@ export class GridView { card.addEventListener("click", (ev) => { if ((ev.target as HTMLElement).closest(".pk-badge")) return; - void openMarkdown(this.app, collectionMdPath(this.project, collectionName), this.leaf); + const mdPath = collectionMdPath(this.project, collectionName); + if (!this.app.vault.getAbstractFileByPath(mdPath)) return; + void openMarkdown(this.app, mdPath, this.leaf); }); card.addEventListener("contextmenu", (ev) => { if ((ev.target as HTMLElement).closest(".pk-badge")) return;