File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1111,11 +1111,14 @@ export default class ChartImp implements Chart {
11111111 return isArray ( coordinates ) ? points : ( points [ 0 ] ?? { } )
11121112 }
11131113
1114- executeAction ( type : ActionType , data : Crosshair ) : void {
1114+ executeAction ( type : ActionType , data : Nullable < Crosshair > ) : void {
11151115 switch ( type ) {
11161116 case 'onCrosshairChange' : {
1117- const crosshair : Crosshair = { ...data }
1118- crosshair . paneId ??= PaneIdConstants . CANDLE
1117+ let crosshair : Nullable < Crosshair > = null
1118+ if ( isValid ( data ) ) {
1119+ crosshair = { ...data }
1120+ crosshair . paneId ??= PaneIdConstants . CANDLE
1121+ }
11191122 this . _chartStore . setCrosshair ( crosshair , { notExecuteAction : true } )
11201123 break
11211124 }
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ export default class StoreImp implements Store {
10901090 }
10911091
10921092 setCrosshair (
1093- crosshair ?: Crosshair ,
1093+ crosshair ?: Nullable < Crosshair > ,
10941094 options ?: { notInvalidate ?: boolean , notExecuteAction ?: boolean , forceInvalidate ?: boolean }
10951095 ) : void {
10961096 const { notInvalidate, notExecuteAction, forceInvalidate } = options ?? { }
You can’t perform that action at this time.
0 commit comments