Skip to content

Commit

Permalink
Remove ts ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Jan 31, 2022
1 parent 68eb9ad commit 197ed52
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
}, []);

const renderControl = ({ name, config }: CustomControlItem) => {
const { controls, chart } = props;
const { controls, chart, exploreState } = props;
const { visibility } = config;

// If the control item is not an object, we have to look up the control data from
Expand All @@ -259,8 +259,7 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
// state, too. Since it's may be expensive to run mapStateToProps for every
// re-render, we only run this when the chart plugin explicitly ask for this.
...(config.mapStateToProps?.length === 3
? // @ts-ignore /* The typing accuses of having an extra parameter. I didn't remove it because I believe it could be an error in the types and not in the code */
config.mapStateToProps(props.exploreState, controls[name], chart)
? config.mapStateToProps(exploreState, controls[name], chart)
: // for other controls, `mapStateToProps` is already run in
// controlUtils/getControlState.ts
undefined),
Expand Down

0 comments on commit 197ed52

Please sign in to comment.