Did the recent update deprecate some functions? I was using it.group()
successfully, but now it gives an error
#177
-
Perhaps an update to Eta did it? This definitely worked for a long time before this, as you can see in this post where I shared my template in spring this year: https://forum.obsidian.md/t/obsidian-zotero-import-templates/56901/3?u=feralflora I think this happened between version 1.1.0-beta.5 and 1.1.0-beta.7. Here's the console log:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Here's the template in question (zt-annots.eta):
|
Beta Was this translation helpful? Give feedback.
-
It's a breaking change in v1.1.0, you should do something like the following now (listed in cheatsheet) <% const byColor = Object.groupBy(it, (annot) => annot.colorName);
const label = {
"red": "Important",
"orange": "Question"
"yellow": "Summary",
"gray": "Comment",
"green": "Answer",
"cyan": "Task",
"blue": "Fact",
"navy": "Definition",
"purple": "Quote",
"brown": "Source",
"magenta": "To Do",
};
for (const color in byColor) { -%>
## <%= label[color] ?? color %>
<%_ for (const annot of byColor[color]) { %>
<%~ include("annotation", annot) %>
<%_ } %>
<% } %> |
Beta Was this translation helpful? Give feedback.
It's a breaking change in v1.1.0, you should do something like the following now (listed in cheatsheet)