Skip to content

Commit

Permalink
fix click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
trash-and-fire committed Apr 7, 2022
1 parent 18de408 commit 683b35d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ export function chart<T extends Array<SeriesActionParams>>(

if (nextOnClick !== onClick) {
if (onClick) {
chart.unsubscribeCrosshairMove(onClick);
chart.subscribeClick(onClick);
}
onClick = nextOnClick;
if (onClick) {
chart.subscribeCrosshairMove(onClick);
chart.unsubscribeClick(onClick);
}
}

Expand Down

0 comments on commit 683b35d

Please sign in to comment.