mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
merge all Model JSON @Object parsers into a reviveFromJson()
This commit is contained in:
parent
76648f04ae
commit
15e07a73e9
18 changed files with 378 additions and 411 deletions
|
|
@ -10,7 +10,7 @@ export class AttachmentCollectionModel extends AbstractCollectionModel
|
|||
* @returns {AttachmentCollectionModel}
|
||||
*/
|
||||
static reviveFromJson(items) {
|
||||
let cb = attachment => AttachmentModel.newInstanceFromJson(attachment),
|
||||
let cb = attachment => AttachmentModel.reviveFromJson(attachment),
|
||||
result = super.reviveFromJson(items, cb);
|
||||
if (!result) {
|
||||
result = new AttachmentCollectionModel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue