Fix some flow errors

This commit is contained in:
uwap 2017-11-14 13:13:31 +01:00
parent 9e45e7f398
commit 48e9572925
4 changed files with 24 additions and 22 deletions

View file

@ -11,7 +11,7 @@ export const renderIcon = (name: string, extraClass?: string) => {
};
export const controlGetIcon = (control: Control, state: State): string => {
return !_.isFunction(control.icon) ? control.icon
return typeof control.icon !== "function" ? control.icon
: control.icon(
_.mapValues(state, (x) => x.internal || x.actual),
_.mapValues(state, (x) => x.actual),