mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Object.entries().forEach() to forEachObjectEntry()
This commit is contained in:
parent
b8eb8f83fa
commit
6d7911a9ed
8 changed files with 18 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { isArray } from 'Common/Utils';
|
||||
import { isArray, forEachObjectEntry } from 'Common/Utils';
|
||||
|
||||
export class AbstractCollectionModel extends Array
|
||||
{
|
||||
|
|
@ -24,7 +24,7 @@ export class AbstractCollectionModel extends Array
|
|||
const result = new this();
|
||||
if (json) {
|
||||
if ('Collection/'+this.name.replace('Model', '') === json['@Object']) {
|
||||
Object.entries(json).forEach(([key, value]) => '@' !== key[0] && (result[key] = value));
|
||||
forEachObjectEntry(json, (key, value) => '@' !== key[0] && (result[key] = value));
|
||||
json = json['@Collection'];
|
||||
}
|
||||
if (isArray(json)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue