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

@ -12,7 +12,7 @@ import {
SetSystemFoldersNotification
} from 'Common/EnumsUser';
import { inFocus, pInt, isArray, arrayLength } from 'Common/Utils';
import { inFocus, pInt, isArray, arrayLength, forEachObjectEntry } from 'Common/Utils';
import { delegateRunOnDestroy, initFullscreen } from 'Common/UtilsUser';
import { encodeHtml, HtmlEditor } from 'Common/Html';
@ -1018,7 +1018,7 @@ class ComposePopupView extends AbstractViewPopup {
if (arrayLength(downloads)) {
Remote.messageUploadAttachments((iError, oData) => {
if (!iError) {
Object.entries(oData.Result).forEach(([tempName, id]) => {
forEachObjectEntry(oData.Result, (tempName, id) => {
const attachment = this.getAttachmentById(id);
if (attachment) {
attachment.tempName(tempName);

View file

@ -1,4 +1,4 @@
import { pInt, pString } from 'Common/Utils';
import { pInt, pString, forEachObjectEntry } from 'Common/Utils';
import { i18n, getNotification } from 'Common/Translator';
import Remote from 'Remote/Admin/Fetch';
@ -275,7 +275,7 @@ class DomainPopupView extends AbstractViewPopup {
clearForm() {
this.edit(false);
Object.entries(this.getDefaults()).forEach(([key, value]) => this[key](value));
forEachObjectEntry(this.getDefaults(), (key, value) => this[key](value));
this.enableSmartPorts(true);
}
}

View file

@ -63,7 +63,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
}
} else {
/* // Not working yet
Object.entries(oData.Result).forEach((key, value) => rl.settings.set(key, value));
forEachObjectEntry(oData.Result, (key, value) => rl.settings.set(key, value));
clearCache();
// MessageUserStore.setMessage();
// MessageUserStore.purgeMessageBodyCache();