obsidian-dataview
obsidian-dataview copied to clipboard
dv.view rendering inconsistantly but appears to be executing
What happened?
Inexplicably, I get the following with some (not all) of the views here is an example of the error message.
Dataview: Failed to execute view 'Templates/2024/views/subpoena.js'.
TypeError: this.path.replaceAll is not a function
It seems to be happening when the results from the query have more than one result. The same queries seem to work when it only has one resolt. However, if I put consol.log commands in the code those show up, so it seems like the code is getting execuited, but the results aren't getting rendered for some reason.
JS
await dv.view("Templates/2024/views/subpoena")
dv.table(
["Respondent", "Target", "Response Due", "Date Sent", "Most Recent Note"],
dv.pages('"TCPA/Subpoenas"')
.where(s => dv.func.contains(s.target, dv.current().file.name))
.map(s => [
dv.fileLink(s.file.name),
"Target: " + dv.fileLink(s.target),
"Response Due: " + dv.func.dateformat(dv.date(s.date_due), 'yyyy-MM-dd'),
"Date Sent: " + dv.func.dateformat(dv.date(s.date_sent), 'yyyy-MM-dd'),
dv.pages('"TCPA/Notes"')
.where(note => dv.func.contains(note.notes, s.file.name))
.sort(note => dv.date(note.date), 'desc')
.map(note => "Last Note:\r" + dv.func.dateformat(dv.date(note.date), 'yyyy-MM-dd') + " - " + note.note)[0] || 'No notes found',
])
.sort(s => s.date_due, 'asc')
);
Dataview Version
0.5.66
Obsidian Version
1.6.3
OS
Windows