mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Bugfix: Contacts management failed
It had a strange array type structure and buggy
This commit is contained in:
parent
0e3275599e
commit
3a315bc543
7 changed files with 44 additions and 40 deletions
|
|
@ -34,11 +34,19 @@ class ContactPropertyModel extends AbstractModel {
|
|||
this.regDisposables([this.placeholderValue, this.largeValue]);
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
type: this.type(),
|
||||
typeStr: this.typeStr(),
|
||||
value: this.value()
|
||||
};
|
||||
}
|
||||
|
||||
static reviveFromJson(json) {
|
||||
const property = super.reviveFromJson(json);
|
||||
if (property) {
|
||||
property.type(pInt(property.type));
|
||||
property.typeStr(pInt(property.typeStr));
|
||||
property.type(pInt(json.type));
|
||||
property.typeStr(pString(json.typeStr));
|
||||
property.value(pString(json.value));
|
||||
return property;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue