Skip to content

Commit

Permalink
fix(core): fixing spreading interaction props
Browse files Browse the repository at this point in the history
You can't spread a boolean.
  • Loading branch information
markmcdowell committed May 11, 2023
1 parent c6be298 commit c6a98fb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/core/src/EventCapture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -685,13 +685,15 @@ export class EventCapture extends React.Component<EventCaptureProps, EventCaptur
? "react-financial-charts-grabbing-cursor"
: "react-financial-charts-crosshair-cursor";

const interactionProps = disableInteraction || {
onMouseDown: this.handleMouseDown,
onClick: this.handleClick,
onContextMenu: this.handleRightClick,
onTouchStart: this.handleTouchStart,
onTouchMove: this.handleTouchMove,
};
const interactionProps = disableInteraction
? undefined
: {
onMouseDown: this.handleMouseDown,
onClick: this.handleClick,
onContextMenu: this.handleRightClick,
onTouchStart: this.handleTouchStart,
onTouchMove: this.handleTouchMove,
};

return (
<rect
Expand Down

0 comments on commit c6a98fb

Please sign in to comment.