Underscore.js _.each() to native Array.forEach() (optional with Object.entries/values)

This commit is contained in:
djmaze 2020-07-22 14:49:18 +02:00
parent 178e5f6ef7
commit a5d41edb24
25 changed files with 72 additions and 79 deletions

View file

@ -157,7 +157,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
} else if (this.encryptKeys()) {
aPublicKeys = [];
_.each(this.encryptKeys(), (oKey) => {
this.encryptKeys().forEach(oKey => {
if (oKey && oKey.key) {
aPublicKeys = aPublicKeys.concat(_.compact(_.flatten(oKey.key.getNativeKeys())));
} else if (oKey && oKey.email) {
@ -279,7 +279,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
@command()
updateCommand() {
_.each(this.encryptKeys(), (oKey) => {
this.encryptKeys().forEach(oKey => {
oKey.removable(!this.sign() || !this.signKey() || this.signKey().key.id !== oKey.key.id);
});
}