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

@ -1,5 +1,4 @@
import window from 'window';
import _ from '_';
import ko from 'ko';
import { StorageResultType, Notification } from 'Common/Enums';
@ -51,7 +50,7 @@ class PackagesAdminSettings {
}
}
_.each(this.packages(), (item) => {
this.packages().forEach(item => {
if (item && packageToRequest && item.loading && item.loading() && packageToRequest.file === item.file) {
packageToRequest.loading(false);
item.loading(false);

View file

@ -36,7 +36,7 @@ class ThemesUserSettings {
this.oThemeAjaxRequest = null;
this.theme.subscribe((value) => {
_.each(this.themesObjects(), (theme) => {
this.themesObjects().forEach(theme => {
theme.selected(value === theme.name);
});