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,7 +1,7 @@
import ko from 'ko';
import { doc, $htmlCL, elementById } from 'Common/Globals';
import { isFunction, forEachObjectValue } from 'Common/Utils';
import { isFunction, forEachObjectValue, forEachObjectEntry } from 'Common/Utils';
let
SCREENS = {},
@ -349,7 +349,7 @@ export const
},
decorateKoCommands = (thisArg, commands) =>
Object.entries(commands).forEach(([key, canExecute]) => {
forEachObjectEntry(commands, (key, canExecute) => {
let command = thisArg[key],
fn = (...args) => fn.enabled() && fn.canExecute() && command.apply(thisArg, args);