Skip to content

Commit

Permalink
fix(DataviewNotes): 🐛 Don't run if there aren't any eligable alts
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Feb 3, 2022
1 parent 6a8cf9d commit 6a5f2c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25104,8 +25104,9 @@ function addDataviewNotesToGraph(plugin, eligableAlts, frontms, mainG) {
const { settings } = plugin;
const { userHiers, dataviewNoteField } = settings;
const dv = getDVApi(plugin);
if (!dv) {
if (!dv && eligableAlts.length) {
new obsidian.Notice(DATAVIEW_MISSING);
return;
}
const fields = getFields(userHiers);
eligableAlts.forEach((altFile) => {
Expand Down
3 changes: 2 additions & 1 deletion src/AlternativeHierarchies/DataviewNotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export function addDataviewNotesToGraph(
const { settings } = plugin;
const { userHiers, dataviewNoteField } = settings;
const dv = getDVApi(plugin);
if (!dv) {
if (!dv && eligableAlts.length) {
new Notice(DATAVIEW_MISSING);
return;
}

const fields = getFields(userHiers);
Expand Down

0 comments on commit 6a5f2c7

Please sign in to comment.