Note default value for text

This commit is contained in:
Mo Bitar
2018-04-06 09:33:10 -05:00
parent 56410620c6
commit 734c867448

View File

@@ -3,6 +3,13 @@ class Note extends Item {
constructor(json_obj) {
super(json_obj);
if(!this.text) {
// Some external editors can't handle a null value for text.
// Notes created on mobile with no text have a null value for it,
// so we'll just set a default here.
this.text = "";
}
if(!this.tags) {
this.tags = [];
}