User info: make it possible to deserialize contentless user info.

master
Tom Hacohen 6 years ago
parent 61a4347a64
commit 34e6fc3668

@ -86,7 +86,9 @@ class BaseItem<T extends BaseItemJson> {
public deserialize(json: T) {
this._json = Object.assign({}, json);
this._encrypted = sjcl.codec.bytes.fromBits(sjcl.codec.base64.toBits(json.content));
if (json.content) {
this._encrypted = sjcl.codec.bytes.fromBits(sjcl.codec.base64.toBits(json.content));
}
this._content = undefined;
}

Loading…
Cancel
Save