mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
fix finding single note by label with mixed case
This commit is contained in:
@@ -75,8 +75,14 @@ function getNoteWithLabel(name, value) {
|
||||
// optimized version (~20 times faster) without using normal search, useful for e.g. finding date notes
|
||||
const attrs = becca.findAttributes('label', name);
|
||||
|
||||
if (value === undefined) {
|
||||
return attrs[0]?.getNote();
|
||||
}
|
||||
|
||||
value = value?.toLowerCase();
|
||||
|
||||
for (const attr of attrs) {
|
||||
if (attr.value === value) {
|
||||
if (attr.value.toLowerCase() === value) {
|
||||
return attr.getNote();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user