mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
return null for not found attribute, closes #1294
This commit is contained in:
parent
10ce26799d
commit
140f0a5dbd
@ -335,7 +335,7 @@ class NoteShort {
|
|||||||
getAttribute(type, name) {
|
getAttribute(type, name) {
|
||||||
const attributes = this.getAttributes(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) {
|
getAttribute(type, name) {
|
||||||
const attributes = this.getAttributes(type, name);
|
const attributes = this.getAttributes(type, name);
|
||||||
|
|
||||||
return attributes.length > 0 ? attributes[0] : 0;
|
return attributes.length > 0 ? attributes[0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user