mirror of
https://github.com/zadam/trilium.git
synced 2025-01-27 17:40:44 +08:00
return null for not found attribute, closes #1294
This commit is contained in:
parent
10ce26799d
commit
140f0a5dbd
2 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ class NoteShort {
|
|||
getAttribute(type, name) {
|
||||
const attributes = this.getAttributes(type, name);
|
||||
|
||||
return attributes.length > 0 ? attributes[0] : 0;
|
||||
return attributes.length > 0 ? attributes[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -307,7 +307,7 @@ class NoteShort {
|
|||
getAttribute(type, name) {
|
||||
const attributes = this.getAttributes(type, name);
|
||||
|
||||
return attributes.length > 0 ? attributes[0] : 0;
|
||||
return attributes.length > 0 ? attributes[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue