Object.entries().forEach() to forEachObjectEntry()

This commit is contained in:
djmaze 2021-12-01 14:23:37 +01:00
parent b8eb8f83fa
commit 6d7911a9ed
8 changed files with 18 additions and 18 deletions

View file

@ -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)) {