mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
displaying and saving number and boolean promoted attributes
This commit is contained in:
@@ -13,10 +13,13 @@ class Attribute extends Entity {
|
||||
constructor(row) {
|
||||
super(row);
|
||||
|
||||
try {
|
||||
this.value = JSON.parse(this.value);
|
||||
if (this.isDefinition()) {
|
||||
try {
|
||||
this.value = JSON.parse(this.value);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
|
||||
async getNote() {
|
||||
@@ -24,7 +27,7 @@ class Attribute extends Entity {
|
||||
}
|
||||
|
||||
isDefinition() {
|
||||
return this.type === 'label' || this.type === 'relation';
|
||||
return this.type === 'label-definition' || this.type === 'relation-definition';
|
||||
}
|
||||
|
||||
async beforeSaving() {
|
||||
|
||||
Reference in New Issue
Block a user