Fix some more flow errors

This commit is contained in:
uwap 2017-11-14 13:23:55 +01:00
parent 48e9572925
commit 9cc827d5a6
2 changed files with 6 additions and 6 deletions

View file

@ -14,4 +14,6 @@ injectTapEventPlugin();
document.title = `${Config.space.name} Map`; document.title = `${Config.space.name} Map`;
ReactDOM.render(<App config={Config} />, document.getElementById("content")); // $FlowFixMe
const contentElement: Element = document.getElementById("content");
ReactDOM.render(<App config={Config} />, contentElement);

View file

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