mirror of
https://github.com/dnlbauer/obsidian-dataview-autocompletion.git
synced 2026-09-11 14:45:30 +00:00
fix: indexing not working if there are non-markdown files
This commit is contained in:
@@ -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]]);
|
||||
|
||||
Reference in New Issue
Block a user