mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
strip # or ~ when getting attribute
This commit is contained in:
@@ -567,6 +567,10 @@ class Note extends AbstractEntity {
|
||||
* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones
|
||||
*/
|
||||
getOwnedAttributes(type, name) {
|
||||
if (name && ["#", "~"].includes(name[0])) {
|
||||
name = name.substr(1);
|
||||
}
|
||||
|
||||
if (type && name) {
|
||||
return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user