return null for not found attribute, closes #1294

This commit is contained in:
zadam 2020-10-08 22:08:58 +02:00
parent 10ce26799d
commit 140f0a5dbd
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}
/**

View file

@ -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;
}
/**