fix: indexing not working if there are non-markdown files

This commit is contained in:
Daniel Bauer
2024-12-17 18:47:41 +01:00
parent 97391f4256
commit 2dae1175f8
5 changed files with 9 additions and 3 deletions

View File

@@ -159,6 +159,8 @@ export class DataviewSuggester extends EditorSuggest<String> {
}
const page = dataviewApi.page(file.path);
if (page === undefined) continue; // not a markdown file
const fields = Object.keys(page)
.filter((k) => k !== "file")
.map((k) => [k, page[k]]);
@@ -218,6 +220,8 @@ export class DataviewSuggester extends EditorSuggest<String> {
const updateCompositeValues = [];
const page = getAPI(this.app).page(file.path);
if (page === undefined) return; // not a markdown file
const fields = Object.keys(page)
.filter((k) => k !== "file")
.map((k) => [k, page[k]]);